Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/msdosfs/direntry.h
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
*/ | */ | ||||
#define DD_DAY_MASK 0x1F /* day of month */ | #define DD_DAY_MASK 0x1F /* day of month */ | ||||
#define DD_DAY_SHIFT 0 | #define DD_DAY_SHIFT 0 | ||||
#define DD_MONTH_MASK 0x1E0 /* month */ | #define DD_MONTH_MASK 0x1E0 /* month */ | ||||
#define DD_MONTH_SHIFT 5 | #define DD_MONTH_SHIFT 5 | ||||
#define DD_YEAR_MASK 0xFE00 /* year - 1980 */ | #define DD_YEAR_MASK 0xFE00 /* year - 1980 */ | ||||
#define DD_YEAR_SHIFT 9 | #define DD_YEAR_SHIFT 9 | ||||
#if defined(_KERNEL) || defined(MAKEFS) | #ifdef _KERNEL | ||||
emaste: I think I got this one from comparing NetBSD and FreeBSD, but maybe I was overzealous. How does… | |||||
Not Done Inline ActionsI made this change because I've added a file usr.sbin/makefs/msdos/msdosfs_conv.c which reimplements a couple of these prototyped functions (winChksum, winSlotCnt, etc). Instead of wrapping the function declarations with #ifdef MAKEFS ... #else ..., I've prototyped them in an usr.sbin/makefs/msdos/msdosfs_extern.h file. Netbsd has _KERNEL || MAKEFS, but our sys/fs/msdosfs/direntry.h has different parameters for some of these reimplemented functions. smahadevan_freebsdfoundation.org: I made this change because I've added a file `usr.sbin/makefs/msdos/msdosfs_conv.c` which… | |||||
struct mbnambuf { | struct mbnambuf { | ||||
size_t nb_len; | size_t nb_len; | ||||
int nb_last_id; | int nb_last_id; | ||||
char nb_buf[WIN_MAXLEN + 1]; | char nb_buf[WIN_MAXLEN + 1]; | ||||
}; | }; | ||||
struct dirent; | struct dirent; | ||||
struct msdosfsmount; | struct msdosfsmount; | ||||
Show All 9 Lines | int unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt, | ||||
int chksum, struct msdosfsmount *pmp); | int chksum, struct msdosfsmount *pmp); | ||||
int winChkName(struct mbnambuf *nbp, const u_char *un, size_t unlen, | int winChkName(struct mbnambuf *nbp, const u_char *un, size_t unlen, | ||||
int chksum, struct msdosfsmount *pmp); | int chksum, struct msdosfsmount *pmp); | ||||
int win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum, | int win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum, | ||||
struct msdosfsmount *pmp); | struct msdosfsmount *pmp); | ||||
uint8_t winChksum(uint8_t *name); | uint8_t winChksum(uint8_t *name); | ||||
int winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp); | int winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp); | ||||
size_t winLenFixup(const u_char *un, size_t unlen); | size_t winLenFixup(const u_char *un, size_t unlen); | ||||
#endif /* _KERNEL || MAKEFS */ | #endif /* _KERNEL */ | ||||
#endif /* !_FS_MSDOSFS_DIRENTRY_H_ */ | #endif /* !_FS_MSDOSFS_DIRENTRY_H_ */ |
I think I got this one from comparing NetBSD and FreeBSD, but maybe I was overzealous. How does NetBSD use this header?