Only pull in <sys/systm.h> #ifdef _KERNEL, since it's a kernel only header.
In the ! _KERNEL case, provide own prototype for panic() instead.
This commit is contained in:
parent
f68aaee236
commit
25ca00a979
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ffs_subr.c,v 1.19 2001/10/30 01:11:54 lukem Exp $ */
|
||||
/* $NetBSD: ffs_subr.c,v 1.20 2002/01/09 23:51:00 lukem Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -36,22 +36,24 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.19 2001/10/30 01:11:54 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ffs_subr.c,v 1.20 2002/01/09 23:51:00 lukem Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#ifndef _KERNEL
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include <ufs/ffs/fs.h>
|
||||
#include <ufs/ffs/ffs_extern.h>
|
||||
#include <ufs/ufs/ufs_bswap.h>
|
||||
#endif
|
||||
|
||||
/* in ffs_tables.c */
|
||||
extern int inside[], around[];
|
||||
extern u_char *fragtbl[];
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifndef _KERNEL
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include <ufs/ffs/fs.h>
|
||||
#include <ufs/ffs/ffs_extern.h>
|
||||
#include <ufs/ufs/ufs_bswap.h>
|
||||
void panic __P((const char *, ...))
|
||||
__attribute__((__noreturn__,__format__(__printf__,1,2)));
|
||||
|
||||
#else /* _KERNEL */
|
||||
#include <sys/systm.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/buf.h>
|
||||
|
@ -98,7 +100,7 @@ ffs_blkatoff(v)
|
|||
*ap->a_bpp = bp;
|
||||
return (0);
|
||||
}
|
||||
#endif
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Update the frsum fields to reflect addition or deletion
|
||||
|
@ -170,7 +172,7 @@ ffs_checkoverlap(bp, ip)
|
|||
panic("Disk buffer overlap");
|
||||
}
|
||||
}
|
||||
#endif /* DIAGNOSTIC */
|
||||
#endif /* _KERNEL && DIAGNOSTIC */
|
||||
|
||||
/*
|
||||
* block operations
|
||||
|
|
Loading…
Reference in New Issue