Index: sys/fs/msdosfs/denode.h =================================================================== --- sys/fs/msdosfs/denode.h +++ sys/fs/msdosfs/denode.h @@ -213,11 +213,26 @@ ((dep)->de_Attributes & ATTR_DIRECTORY) ? 0 : (dep)->de_FileSize), \ putushort((dp)->deHighClust, (dep)->de_StartCluster >> 16)) -#ifdef _KERNEL +#if defined(_KERNEL) || defined(MAKEFS) #define VTODE(vp) ((struct denode *)(vp)->v_data) #define DETOV(de) ((de)->de_vnode) +#endif + +#ifdef MAKEFS + +struct buf; +struct componentname; +struct denode; +struct direntry; +struct msdosfsmount; +struct ucred; + +#endif + +#ifdef _KERNEL + #define DETIMES(dep, acc, mod, cre) do { \ if ((dep)->de_flag & DE_UPDATE) { \ (dep)->de_flag |= DE_MODIFIED; \ @@ -266,6 +281,9 @@ int msdosfs_inactive(struct vop_inactive_args *); int msdosfs_reclaim(struct vop_reclaim_args *); +#endif + +#if defined(_KERNEL) || defined(MAKEFS) /* * Internal service routine prototypes. */ Index: sys/fs/msdosfs/fat.h =================================================================== --- sys/fs/msdosfs/fat.h +++ sys/fs/msdosfs/fat.h @@ -82,7 +82,7 @@ #define MSDOSFSEOF(pmp, cn) ((((cn) | ~(pmp)->pm_fatmask) & CLUST_EOFS) == CLUST_EOFS) -#ifdef _KERNEL +#if defined(_KERNEL) || defined(MAKEFS) /* * These are the values for the function argument to the function * fatentry(). Index: sys/fs/msdosfs/msdosfsmount.h =================================================================== --- sys/fs/msdosfs/msdosfsmount.h +++ sys/fs/msdosfs/msdosfsmount.h @@ -53,7 +53,7 @@ #ifndef _MSDOSFS_MSDOSFSMOUNT_H_ #define _MSDOSFS_MSDOSFSMOUNT_H_ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(MAKEFS) #include #include @@ -214,6 +214,9 @@ ((dirclu) == MSDOSFSROOT \ ? roottobn((pmp), (dirofs)) \ : cntobn((pmp), (dirclu))) +#endif /* _KERNEL || MAKEFS */ + +#ifdef _KERNEL #define MSDOSFS_LOCK_MP(pmp) \ lockmgr(&(pmp)->pm_fatlock, LK_EXCLUSIVE, NULL) @@ -224,6 +227,7 @@ #endif /* _KERNEL */ +#ifndef MAKEFS /* * Arguments to mount MSDOS filesystems. */ @@ -241,6 +245,7 @@ char *cs_local; /* Local Charset */ mode_t dirmask; /* dir mask to be applied for msdosfs perms */ }; +#endif /* !MAKEFS */ /* * Msdosfs mount options: