Drop the include of <ufs/ffs/ffs_extern.h> from usr.sbin/makefs/ffs/ffs_bswap.c
and usr.sbin/makefs/ffs/ffs_subr.c as they have no need of anything in that file. No other programs or libraries include <ufs/ffs/ffs_extern.h> (nor should they as it is totally in-kernel interfaces). For added protection I enclosed the entire contents of <ufs/ffs/ffs_extern.h> in ifdef _KERNEL. Feedback from: Bruce Evans and Tai-hwa Liang
This commit is contained in:
parent
160e5953c2
commit
ff13f23f84
@ -33,7 +33,10 @@
|
||||
#ifndef _UFS_FFS_EXTERN_H
|
||||
#define _UFS_FFS_EXTERN_H
|
||||
|
||||
enum vtype;
|
||||
#ifndef _KERNEL
|
||||
#error "No user-serving parts inside"
|
||||
#else
|
||||
|
||||
struct buf;
|
||||
struct cg;
|
||||
struct fid;
|
||||
@ -168,7 +171,6 @@ void softdep_freework(struct workhead *);
|
||||
|
||||
int ffs_rdonly(struct inode *);
|
||||
|
||||
#ifdef _KERNEL
|
||||
TAILQ_HEAD(snaphead, inode);
|
||||
|
||||
struct snapdata {
|
||||
@ -178,6 +180,7 @@ struct snapdata {
|
||||
daddr_t *sn_blklist;
|
||||
struct lock sn_lock;
|
||||
};
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* !_UFS_FFS_EXTERN_H */
|
||||
|
@ -41,14 +41,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include "ffs/ufs_bswap.h"
|
||||
#include <ufs/ffs/fs.h>
|
||||
/* XXX temporary */
|
||||
struct ufsmount;
|
||||
struct bufobj;
|
||||
struct mount;
|
||||
struct vnode;
|
||||
typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags,
|
||||
struct vnode **vpp);
|
||||
#include <ufs/ffs/ffs_extern.h>
|
||||
|
||||
#if !defined(_KERNEL)
|
||||
#include <stddef.h>
|
||||
|
@ -38,15 +38,8 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <ufs/ufs/dinode.h>
|
||||
#include <ufs/ffs/fs.h>
|
||||
/* XXX temporary */
|
||||
struct ufsmount;
|
||||
struct bufobj;
|
||||
struct mount;
|
||||
struct vnode;
|
||||
typedef int vfs_vget_t(struct mount *mp, ino_t ino, int flags,
|
||||
struct vnode **vpp);
|
||||
#include <ufs/ffs/ffs_extern.h>
|
||||
#include "ffs/ufs_bswap.h"
|
||||
|
||||
void panic __P((const char *, ...))
|
||||
__attribute__((__noreturn__,__format__(__printf__,1,2)));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user