aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/msdosfs
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2017-06-12 20:42:37 +0000
committerEd Maste <emaste@FreeBSD.org>2017-06-12 20:42:37 +0000
commitdb20c27d2833684edd6fb7584c0e6bfb5d7462e4 (patch)
tree22e27b18aafae1eece99035c5ef4782fafcad53e /sys/fs/msdosfs
parentb275edf75318efbbc87f43f64813d2b5c39f1bd5 (diff)
downloadsrc-db20c27d2833684edd6fb7584c0e6bfb5d7462e4.tar.gz
src-db20c27d2833684edd6fb7584c0e6bfb5d7462e4.zip
msdosfs: adjust #ifdefs to be similar to NetBSD
- Add header guards where missing - Make parts available for use in makefs Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=319870
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r--sys/fs/msdosfs/denode.h8
-rw-r--r--sys/fs/msdosfs/direntry.h4
-rw-r--r--sys/fs/msdosfs/fat.h7
3 files changed, 13 insertions, 6 deletions
diff --git a/sys/fs/msdosfs/denode.h b/sys/fs/msdosfs/denode.h
index 7960f20ddf22..1c7fd5e1db1f 100644
--- a/sys/fs/msdosfs/denode.h
+++ b/sys/fs/msdosfs/denode.h
@@ -47,6 +47,8 @@
*
* October 1992
*/
+#ifndef _FS_MSDOSFS_DENODE_H_
+#define _FS_MSDOSFS_DENODE_H_
/*
* This is the pc filesystem specific portion of the vnode structure.
@@ -207,7 +209,7 @@ struct denode {
((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)
@@ -277,4 +279,6 @@ int deupdat(struct denode *dep, int waitfor);
int removede(struct denode *pdep, struct denode *dep);
int detrunc(struct denode *dep, u_long length, int flags, struct ucred *cred);
int doscheckpath( struct denode *source, struct denode *target);
-#endif /* _KERNEL */
+#endif /* _KERNEL || MAKEFS */
+#endif /* !_FS_MSDOSFS_DENODE_H_ */
+
diff --git a/sys/fs/msdosfs/direntry.h b/sys/fs/msdosfs/direntry.h
index 6ff18eb4a9ca..e36e8e80137f 100644
--- a/sys/fs/msdosfs/direntry.h
+++ b/sys/fs/msdosfs/direntry.h
@@ -133,7 +133,7 @@ struct winentry {
#define DD_YEAR_MASK 0xFE00 /* year - 1980 */
#define DD_YEAR_SHIFT 9
-#ifdef _KERNEL
+#if defined(_KERNEL) || defined(MAKEFS)
struct mbnambuf {
size_t nb_len;
int nb_last_id;
@@ -159,5 +159,5 @@ int win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum,
uint8_t winChksum(uint8_t *name);
int winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp);
size_t winLenFixup(const u_char *un, size_t unlen);
-#endif /* _KERNEL */
+#endif /* _KERNEL || MAKEFS */
#endif /* !_FS_MSDOSFS_DIRENTRY_H_ */
diff --git a/sys/fs/msdosfs/fat.h b/sys/fs/msdosfs/fat.h
index ff8566e82d09..46e7af4f7550 100644
--- a/sys/fs/msdosfs/fat.h
+++ b/sys/fs/msdosfs/fat.h
@@ -48,6 +48,8 @@
* October 1992
*/
+#ifndef _FS_MSDOSFS_FAT_H_
+#define _FS_MSDOSFS_FAT_H_
/*
* Some useful cluster numbers.
*/
@@ -78,7 +80,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().
@@ -101,4 +103,5 @@ int extendfile(struct denode *dep, u_long count, struct buf **bpp, u_long *ncp,
void fc_purge(struct denode *dep, u_int frcn);
int markvoldirty(struct msdosfsmount *pmp, int dirty);
-#endif /* _KERNEL */
+#endif /* _KERNEL || MAKEFS */
+#endif /* !_FS_MSDOSFS_FAT_H_ */