svn commit: r318548 - head/sys/fs/msdosfs
Ed Maste
emaste at FreeBSD.org
Fri May 19 18:13:43 UTC 2017
Author: emaste
Date: Fri May 19 18:13:41 2017
New Revision: 318548
URL: https://svnweb.freebsd.org/changeset/base/318548
Log:
msdosfs: use C99 types
General cleanup, for diff reduction with NetBSD and future use by FAT
support in makefs.
Submitted by: Siva Mahadevan <smahadevan at freebsdfoundation.org>
Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10821
Modified:
head/sys/fs/msdosfs/bootsect.h
head/sys/fs/msdosfs/bpb.h
head/sys/fs/msdosfs/denode.h
head/sys/fs/msdosfs/direntry.h
head/sys/fs/msdosfs/msdosfs_conv.c
head/sys/fs/msdosfs/msdosfs_fat.c
head/sys/fs/msdosfs/msdosfs_lookup.c
head/sys/fs/msdosfs/msdosfs_vfsops.c
head/sys/fs/msdosfs/msdosfsmount.h
Modified: head/sys/fs/msdosfs/bootsect.h
==============================================================================
--- head/sys/fs/msdosfs/bootsect.h Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/bootsect.h Fri May 19 18:13:41 2017 (r318548)
@@ -25,13 +25,13 @@
* first sector of a partitioned hard disk.
*/
struct bootsector33 {
- u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */
+ uint8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */
int8_t bsOemName[8]; /* OEM name and version */
int8_t bsBPB[19]; /* BIOS parameter block */
int8_t bsDriveNumber; /* drive number (0x80) */
int8_t bsBootCode[479]; /* pad so struct is 512b */
- u_int8_t bsBootSectSig0;
- u_int8_t bsBootSectSig1;
+ uint8_t bsBootSectSig0;
+ uint8_t bsBootSectSig1;
#define BOOTSIG0 0x55
#define BOOTSIG1 0xaa
};
@@ -47,25 +47,25 @@ struct extboot {
};
struct bootsector50 {
- u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */
+ uint8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */
int8_t bsOemName[8]; /* OEM name and version */
int8_t bsBPB[25]; /* BIOS parameter block */
int8_t bsExt[26]; /* Bootsector Extension */
int8_t bsBootCode[448]; /* pad so structure is 512b */
- u_int8_t bsBootSectSig0;
- u_int8_t bsBootSectSig1;
+ uint8_t bsBootSectSig0;
+ uint8_t bsBootSectSig1;
#define BOOTSIG0 0x55
#define BOOTSIG1 0xaa
};
struct bootsector710 {
- u_int8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */
+ uint8_t bsJump[3]; /* jump inst E9xxxx or EBxx90 */
int8_t bsOEMName[8]; /* OEM name and version */
int8_t bsBPB[53]; /* BIOS parameter block */
int8_t bsExt[26]; /* Bootsector Extension */
int8_t bsBootCode[420]; /* pad so structure is 512b */
- u_int8_t bsBootSectSig0;
- u_int8_t bsBootSectSig1;
+ uint8_t bsBootSectSig0;
+ uint8_t bsBootSectSig1;
#define BOOTSIG0 0x55
#define BOOTSIG1 0xaa
};
Modified: head/sys/fs/msdosfs/bpb.h
==============================================================================
--- head/sys/fs/msdosfs/bpb.h Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/bpb.h Fri May 19 18:13:41 2017 (r318548)
@@ -24,17 +24,17 @@
* BIOS Parameter Block (BPB) for DOS 3.3
*/
struct bpb33 {
- u_int16_t bpbBytesPerSec; /* bytes per sector */
- u_int8_t bpbSecPerClust; /* sectors per cluster */
- u_int16_t bpbResSectors; /* number of reserved sectors */
- u_int8_t bpbFATs; /* number of FATs */
- u_int16_t bpbRootDirEnts; /* number of root directory entries */
- u_int16_t bpbSectors; /* total number of sectors */
- u_int8_t bpbMedia; /* media descriptor */
- u_int16_t bpbFATsecs; /* number of sectors per FAT */
- u_int16_t bpbSecPerTrack; /* sectors per track */
- u_int16_t bpbHeads; /* number of heads */
- u_int16_t bpbHiddenSecs; /* number of hidden sectors */
+ uint16_t bpbBytesPerSec; /* bytes per sector */
+ uint8_t bpbSecPerClust; /* sectors per cluster */
+ uint16_t bpbResSectors; /* number of reserved sectors */
+ uint8_t bpbFATs; /* number of FATs */
+ uint16_t bpbRootDirEnts; /* number of root directory entries */
+ uint16_t bpbSectors; /* total number of sectors */
+ uint8_t bpbMedia; /* media descriptor */
+ uint16_t bpbFATsecs; /* number of sectors per FAT */
+ uint16_t bpbSecPerTrack; /* sectors per track */
+ uint16_t bpbHeads; /* number of heads */
+ uint16_t bpbHiddenSecs; /* number of hidden sectors */
};
/*
@@ -42,46 +42,46 @@ struct bpb33 {
* and bpbHugeSectors is not in the 3.3 bpb.
*/
struct bpb50 {
- u_int16_t bpbBytesPerSec; /* bytes per sector */
- u_int8_t bpbSecPerClust; /* sectors per cluster */
- u_int16_t bpbResSectors; /* number of reserved sectors */
- u_int8_t bpbFATs; /* number of FATs */
- u_int16_t bpbRootDirEnts; /* number of root directory entries */
- u_int16_t bpbSectors; /* total number of sectors */
- u_int8_t bpbMedia; /* media descriptor */
- u_int16_t bpbFATsecs; /* number of sectors per FAT */
- u_int16_t bpbSecPerTrack; /* sectors per track */
- u_int16_t bpbHeads; /* number of heads */
- u_int32_t bpbHiddenSecs; /* # of hidden sectors */
- u_int32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */
+ uint16_t bpbBytesPerSec; /* bytes per sector */
+ uint8_t bpbSecPerClust; /* sectors per cluster */
+ uint16_t bpbResSectors; /* number of reserved sectors */
+ uint8_t bpbFATs; /* number of FATs */
+ uint16_t bpbRootDirEnts; /* number of root directory entries */
+ uint16_t bpbSectors; /* total number of sectors */
+ uint8_t bpbMedia; /* media descriptor */
+ uint16_t bpbFATsecs; /* number of sectors per FAT */
+ uint16_t bpbSecPerTrack; /* sectors per track */
+ uint16_t bpbHeads; /* number of heads */
+ uint32_t bpbHiddenSecs; /* # of hidden sectors */
+ uint32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */
};
/*
* BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50.
*/
struct bpb710 {
- u_int16_t bpbBytesPerSec; /* bytes per sector */
- u_int8_t bpbSecPerClust; /* sectors per cluster */
- u_int16_t bpbResSectors; /* number of reserved sectors */
- u_int8_t bpbFATs; /* number of FATs */
- u_int16_t bpbRootDirEnts; /* number of root directory entries */
- u_int16_t bpbSectors; /* total number of sectors */
- u_int8_t bpbMedia; /* media descriptor */
- u_int16_t bpbFATsecs; /* number of sectors per FAT */
- u_int16_t bpbSecPerTrack; /* sectors per track */
- u_int16_t bpbHeads; /* number of heads */
- u_int32_t bpbHiddenSecs; /* # of hidden sectors */
- u_int32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */
- u_int32_t bpbBigFATsecs; /* like bpbFATsecs for FAT32 */
- u_int16_t bpbExtFlags; /* extended flags: */
+ uint16_t bpbBytesPerSec; /* bytes per sector */
+ uint8_t bpbSecPerClust; /* sectors per cluster */
+ uint16_t bpbResSectors; /* number of reserved sectors */
+ uint8_t bpbFATs; /* number of FATs */
+ uint16_t bpbRootDirEnts; /* number of root directory entries */
+ uint16_t bpbSectors; /* total number of sectors */
+ uint8_t bpbMedia; /* media descriptor */
+ uint16_t bpbFATsecs; /* number of sectors per FAT */
+ uint16_t bpbSecPerTrack; /* sectors per track */
+ uint16_t bpbHeads; /* number of heads */
+ uint32_t bpbHiddenSecs; /* # of hidden sectors */
+ uint32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */
+ uint32_t bpbBigFATsecs; /* like bpbFATsecs for FAT32 */
+ uint16_t bpbExtFlags; /* extended flags: */
#define FATNUM 0xf /* mask for numbering active FAT */
#define FATMIRROR 0x80 /* FAT is mirrored (like it always was) */
- u_int16_t bpbFSVers; /* filesystem version */
+ uint16_t bpbFSVers; /* filesystem version */
#define FSVERS 0 /* currently only 0 is understood */
- u_int32_t bpbRootClust; /* start cluster for root directory */
- u_int16_t bpbFSInfo; /* filesystem info structure sector */
- u_int16_t bpbBackup; /* backup boot sector */
- u_int8_t bpbReserved[12]; /* reserved for future expansion */
+ uint32_t bpbRootClust; /* start cluster for root directory */
+ uint16_t bpbFSInfo; /* filesystem info structure sector */
+ uint16_t bpbBackup; /* backup boot sector */
+ uint8_t bpbReserved[12]; /* reserved for future expansion */
};
/*
@@ -138,37 +138,37 @@ struct byte_bpb50 {
* BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50.
*/
struct byte_bpb710 {
- u_int8_t bpbBytesPerSec[2]; /* bytes per sector */
- u_int8_t bpbSecPerClust; /* sectors per cluster */
- u_int8_t bpbResSectors[2]; /* number of reserved sectors */
- u_int8_t bpbFATs; /* number of FATs */
- u_int8_t bpbRootDirEnts[2]; /* number of root directory entries */
- u_int8_t bpbSectors[2]; /* total number of sectors */
- u_int8_t bpbMedia; /* media descriptor */
- u_int8_t bpbFATsecs[2]; /* number of sectors per FAT */
- u_int8_t bpbSecPerTrack[2]; /* sectors per track */
- u_int8_t bpbHeads[2]; /* number of heads */
- u_int8_t bpbHiddenSecs[4]; /* # of hidden sectors */
- u_int8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */
- u_int8_t bpbBigFATsecs[4]; /* like bpbFATsecs for FAT32 */
- u_int8_t bpbExtFlags[2]; /* extended flags: */
- u_int8_t bpbFSVers[2]; /* filesystem version */
- u_int8_t bpbRootClust[4]; /* start cluster for root directory */
- u_int8_t bpbFSInfo[2]; /* filesystem info structure sector */
- u_int8_t bpbBackup[2]; /* backup boot sector */
- u_int8_t bpbReserved[12]; /* reserved for future expansion */
+ uint8_t bpbBytesPerSec[2]; /* bytes per sector */
+ uint8_t bpbSecPerClust; /* sectors per cluster */
+ uint8_t bpbResSectors[2]; /* number of reserved sectors */
+ uint8_t bpbFATs; /* number of FATs */
+ uint8_t bpbRootDirEnts[2]; /* number of root directory entries */
+ uint8_t bpbSectors[2]; /* total number of sectors */
+ uint8_t bpbMedia; /* media descriptor */
+ uint8_t bpbFATsecs[2]; /* number of sectors per FAT */
+ uint8_t bpbSecPerTrack[2]; /* sectors per track */
+ uint8_t bpbHeads[2]; /* number of heads */
+ uint8_t bpbHiddenSecs[4]; /* # of hidden sectors */
+ uint8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */
+ uint8_t bpbBigFATsecs[4]; /* like bpbFATsecs for FAT32 */
+ uint8_t bpbExtFlags[2]; /* extended flags: */
+ uint8_t bpbFSVers[2]; /* filesystem version */
+ uint8_t bpbRootClust[4]; /* start cluster for root directory */
+ uint8_t bpbFSInfo[2]; /* filesystem info structure sector */
+ uint8_t bpbBackup[2]; /* backup boot sector */
+ uint8_t bpbReserved[12]; /* reserved for future expansion */
};
/*
* FAT32 FSInfo block.
*/
struct fsinfo {
- u_int8_t fsisig1[4];
- u_int8_t fsifill1[480];
- u_int8_t fsisig2[4];
- u_int8_t fsinfree[4];
- u_int8_t fsinxtfree[4];
- u_int8_t fsifill2[12];
- u_int8_t fsisig3[4];
+ uint8_t fsisig1[4];
+ uint8_t fsifill1[480];
+ uint8_t fsisig2[4];
+ uint8_t fsinfree[4];
+ uint8_t fsinxtfree[4];
+ uint8_t fsifill2[12];
+ uint8_t fsisig3[4];
};
#endif /* !_FS_MSDOSFS_BPB_H_ */
Modified: head/sys/fs/msdosfs/denode.h
==============================================================================
--- head/sys/fs/msdosfs/denode.h Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/denode.h Fri May 19 18:13:41 2017 (r318548)
@@ -158,7 +158,7 @@ struct denode {
u_long de_FileSize; /* size of file in bytes */
struct fatcache de_fc[FC_SIZE]; /* fat cache */
u_quad_t de_modrev; /* Revision level for lease. */
- u_int64_t de_inode; /* Inode number (really byte offset of direntry) */
+ uint64_t de_inode; /* Inode number (really byte offset of direntry) */
};
/*
@@ -224,7 +224,7 @@ struct denode {
break; \
} \
if ((dep)->de_flag & DE_ACCESS) { \
- u_int16_t adate; \
+ uint16_t adate; \
\
timespec2fattime((acc), 0, &adate, NULL, NULL); \
if (adate != (dep)->de_ADate) { \
@@ -247,10 +247,10 @@ struct defid {
u_short defid_len; /* length of structure */
u_short defid_pad; /* force long alignment */
- u_int32_t defid_dirclust; /* cluster this dir entry came from */
- u_int32_t defid_dirofs; /* offset of entry within the cluster */
+ uint32_t defid_dirclust; /* cluster this dir entry came from */
+ uint32_t defid_dirofs; /* offset of entry within the cluster */
#if 0
- u_int32_t defid_gen; /* generation number */
+ uint32_t defid_gen; /* generation number */
#endif
};
Modified: head/sys/fs/msdosfs/direntry.h
==============================================================================
--- head/sys/fs/msdosfs/direntry.h Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/direntry.h Fri May 19 18:13:41 2017 (r318548)
@@ -54,11 +54,11 @@
* Structure of a dos directory entry.
*/
struct direntry {
- u_int8_t deName[11]; /* filename, blank filled */
+ uint8_t deName[11]; /* filename, blank filled */
#define SLOT_EMPTY 0x00 /* slot has never been used */
#define SLOT_E5 0x05 /* the real value is 0xe5 */
#define SLOT_DELETED 0xe5 /* file in this slot deleted */
- u_int8_t deAttributes; /* file attributes */
+ uint8_t deAttributes; /* file attributes */
#define ATTR_NORMAL 0x00 /* normal file */
#define ATTR_READONLY 0x01 /* file is readonly */
#define ATTR_HIDDEN 0x02 /* file is hidden */
@@ -66,35 +66,35 @@ struct direntry {
#define ATTR_VOLUME 0x08 /* entry is a volume label */
#define ATTR_DIRECTORY 0x10 /* entry is a directory name */
#define ATTR_ARCHIVE 0x20 /* file is new or modified */
- u_int8_t deLowerCase; /* NT VFAT lower case flags */
+ uint8_t deLowerCase; /* NT VFAT lower case flags */
#define LCASE_BASE 0x08 /* filename base in lower case */
#define LCASE_EXT 0x10 /* filename extension in lower case */
- u_int8_t deCHundredth; /* hundredth of seconds in CTime */
- u_int8_t deCTime[2]; /* create time */
- u_int8_t deCDate[2]; /* create date */
- u_int8_t deADate[2]; /* access date */
- u_int8_t deHighClust[2]; /* high bytes of cluster number */
- u_int8_t deMTime[2]; /* last update time */
- u_int8_t deMDate[2]; /* last update date */
- u_int8_t deStartCluster[2]; /* starting cluster of file */
- u_int8_t deFileSize[4]; /* size of file in bytes */
+ uint8_t deCHundredth; /* hundredth of seconds in CTime */
+ uint8_t deCTime[2]; /* create time */
+ uint8_t deCDate[2]; /* create date */
+ uint8_t deADate[2]; /* access date */
+ uint8_t deHighClust[2]; /* high bytes of cluster number */
+ uint8_t deMTime[2]; /* last update time */
+ uint8_t deMDate[2]; /* last update date */
+ uint8_t deStartCluster[2]; /* starting cluster of file */
+ uint8_t deFileSize[4]; /* size of file in bytes */
};
/*
* Structure of a Win95 long name directory entry
*/
struct winentry {
- u_int8_t weCnt;
+ uint8_t weCnt;
#define WIN_LAST 0x40
#define WIN_CNT 0x3f
- u_int8_t wePart1[10];
- u_int8_t weAttributes;
+ uint8_t wePart1[10];
+ uint8_t weAttributes;
#define ATTR_WIN95 0x0f
- u_int8_t weReserved1;
- u_int8_t weChksum;
- u_int8_t wePart2[12];
- u_int16_t weReserved2;
- u_int8_t wePart3[4];
+ uint8_t weReserved1;
+ uint8_t weChksum;
+ uint8_t wePart2[12];
+ uint16_t weReserved2;
+ uint8_t wePart3[4];
};
#define WIN_CHARS 13 /* Number of chars per winentry */
@@ -156,7 +156,7 @@ int winChkName(struct mbnambuf *nbp, con
int chksum, struct msdosfsmount *pmp);
int win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum,
struct msdosfsmount *pmp);
-u_int8_t winChksum(u_int8_t *name);
+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 */
Modified: head/sys/fs/msdosfs/msdosfs_conv.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_conv.c Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/msdosfs_conv.c Fri May 19 18:13:41 2017 (r318548)
@@ -62,9 +62,9 @@ extern struct iconv_functions *msdosfs_i
static int mbsadjpos(const char **, size_t, size_t, int, int, void *handle);
static u_char * dos2unixchr(u_char *, const u_char **, size_t *, int, struct msdosfsmount *);
-static u_int16_t unix2doschr(const u_char **, size_t *, struct msdosfsmount *);
-static u_char * win2unixchr(u_char *, u_int16_t, struct msdosfsmount *);
-static u_int16_t unix2winchr(const u_char **, size_t *, int, struct msdosfsmount *);
+static uint16_t unix2doschr(const u_char **, size_t *, struct msdosfsmount *);
+static u_char * win2unixchr(u_char *, uint16_t, struct msdosfsmount *);
+static uint16_t unix2winchr(const u_char **, size_t *, int, struct msdosfsmount *);
/*
* 0 - character disallowed in long file name.
@@ -303,7 +303,7 @@ unix2dosfn(const u_char *un, u_char dn[1
int conv = 1;
const u_char *cp, *dp, *dp1;
u_char gentext[6], *wcp;
- u_int16_t c;
+ uint16_t c;
/*
* Fill the dos filename string with blanks. These are DOS's pad
@@ -518,9 +518,9 @@ int
unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt,
int chksum, struct msdosfsmount *pmp)
{
- u_int8_t *wcp;
+ uint8_t *wcp;
int i, end;
- u_int16_t code;
+ uint16_t code;
/*
* Drop trailing blanks and dots
@@ -536,7 +536,7 @@ unix2winfn(const u_char *un, size_t unle
/*
* Initialize winentry to some useful default
*/
- for (wcp = (u_int8_t *)wep, i = sizeof(*wep); --i >= 0; *wcp++ = 0xff);
+ for (wcp = (uint8_t *)wep, i = sizeof(*wep); --i >= 0; *wcp++ = 0xff);
wep->weCnt = cnt;
wep->weAttributes = ATTR_WIN95;
wep->weReserved1 = 0;
@@ -583,7 +583,7 @@ winChkName(struct mbnambuf *nbp, const u
struct msdosfsmount *pmp)
{
size_t len;
- u_int16_t c1, c2;
+ uint16_t c1, c2;
u_char *np;
struct dirent dirbuf;
@@ -630,9 +630,9 @@ win2unixfn(struct mbnambuf *nbp, struct
struct msdosfsmount *pmp)
{
u_char *c, tmpbuf[5];
- u_int8_t *cp;
- u_int8_t *np, name[WIN_CHARS * 3 + 1];
- u_int16_t code;
+ uint8_t *cp;
+ uint8_t *np, name[WIN_CHARS * 3 + 1];
+ uint16_t code;
int i;
if ((wep->weCnt&WIN_CNT) > howmany(WIN_MAXLEN, WIN_CHARS)
@@ -722,11 +722,11 @@ win2unixfn(struct mbnambuf *nbp, struct
/*
* Compute the unrolled checksum of a DOS filename for Win95 LFN use.
*/
-u_int8_t
-winChksum(u_int8_t *name)
+uint8_t
+winChksum(uint8_t *name)
{
int i;
- u_int8_t s;
+ uint8_t s;
for (s = 0, i = 11; --i >= 0; s += *name++)
s = (s << 7)|(s >> 1);
@@ -838,12 +838,12 @@ dos2unixchr(u_char *outbuf, const u_char
/*
* Convert Local char to DOS char
*/
-static u_int16_t
+static uint16_t
unix2doschr(const u_char **instr, size_t *ilen, struct msdosfsmount *pmp)
{
u_char c;
char *up, *outp, unicode[3], outbuf[3];
- u_int16_t wc;
+ uint16_t wc;
size_t len, ucslen, unixlen, olen;
if (pmp->pm_flags & MSDOSFSMNT_KICONV && msdosfs_iconv) {
@@ -909,14 +909,14 @@ unix2doschr(const u_char **instr, size_t
c = *(*instr)++;
c = l2u[c];
c = unix2dos[c];
- return ((u_int16_t)c);
+ return ((uint16_t)c);
}
/*
* Convert Windows char to Local char
*/
static u_char *
-win2unixchr(u_char *outbuf, u_int16_t wc, struct msdosfsmount *pmp)
+win2unixchr(u_char *outbuf, uint16_t wc, struct msdosfsmount *pmp)
{
u_char *inp, *outp, inbuf[3];
size_t ilen, olen, len;
@@ -951,11 +951,11 @@ win2unixchr(u_char *outbuf, u_int16_t wc
/*
* Convert Local char to Windows char
*/
-static u_int16_t
+static uint16_t
unix2winchr(const u_char **instr, size_t *ilen, int lower, struct msdosfsmount *pmp)
{
u_char *outp, outbuf[3];
- u_int16_t wc;
+ uint16_t wc;
size_t olen;
if (*ilen == 0)
Modified: head/sys/fs/msdosfs/msdosfs_fat.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_fat.c Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/msdosfs_fat.c Fri May 19 18:13:41 2017 (r318548)
@@ -338,9 +338,9 @@ updatefats(struct msdosfsmount *pmp, str
bcopy(bp->b_data, bpn->b_data, bp->b_bcount);
/* Force the clean bit on in the other copies. */
if (cleanfat == 16)
- ((u_int8_t *)bpn->b_data)[3] |= 0x80;
+ ((uint8_t *)bpn->b_data)[3] |= 0x80;
else if (cleanfat == 32)
- ((u_int8_t *)bpn->b_data)[7] |= 0x08;
+ ((uint8_t *)bpn->b_data)[7] |= 0x08;
if (pmp->pm_mountp->mnt_flag & MNT_SYNCHRONOUS)
bwrite(bpn);
else
Modified: head/sys/fs/msdosfs/msdosfs_lookup.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_lookup.c Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/msdosfs_lookup.c Fri May 19 18:13:41 2017 (r318548)
@@ -62,7 +62,7 @@
#include <fs/msdosfs/msdosfsmount.h>
static int msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp,
- struct componentname *cnp, u_int64_t *inum);
+ struct componentname *cnp, uint64_t *inum);
int
msdosfs_lookup(struct vop_cachedlookup_args *ap)
@@ -110,7 +110,7 @@ msdosfs_deget_dotdot(struct mount *mp, v
*/
static int
msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp,
- struct componentname *cnp, u_int64_t *dd_inum)
+ struct componentname *cnp, uint64_t *dd_inum)
{
struct mbnambuf nb;
daddr_t bn;
@@ -135,7 +135,7 @@ msdosfs_lookup_(struct vnode *vdp, struc
int flags = cnp->cn_flags;
int nameiop = cnp->cn_nameiop;
int unlen;
- u_int64_t inode1;
+ uint64_t inode1;
int wincnt = 1;
int chksum = -1, chksum_ok;
@@ -656,7 +656,7 @@ createde(struct denode *dep, struct deno
* Now write the Win95 long name
*/
if (ddep->de_fndcnt > 0) {
- u_int8_t chksum = winChksum(ndep->deName);
+ uint8_t chksum = winChksum(ndep->deName);
const u_char *un = (const u_char *)cnp->cn_nameptr;
int unlen = cnp->cn_namelen;
int cnt = 1;
Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c Fri May 19 18:13:41 2017 (r318548)
@@ -398,7 +398,7 @@ mountmsdosfs(struct vnode *devvp, struct
struct byte_bpb33 *b33;
struct byte_bpb50 *b50;
struct byte_bpb710 *b710;
- u_int8_t SecPerClust;
+ uint8_t SecPerClust;
u_long clusters;
int ronly, error;
struct g_consumer *cp;
Modified: head/sys/fs/msdosfs/msdosfsmount.h
==============================================================================
--- head/sys/fs/msdosfs/msdosfsmount.h Fri May 19 18:07:28 2017 (r318547)
+++ head/sys/fs/msdosfs/msdosfsmount.h Fri May 19 18:13:41 2017 (r318548)
@@ -96,7 +96,7 @@ struct msdosfsmount {
u_long pm_fatblocksize; /* size of fat blocks in bytes */
u_long pm_fatblocksec; /* size of fat blocks in sectors */
u_long pm_fatsize; /* size of fat in bytes */
- u_int32_t pm_fatmask; /* mask to use for fat numbers */
+ uint32_t pm_fatmask; /* mask to use for fat numbers */
u_long pm_fsinfo; /* fsinfo block number */
u_long pm_nxtfree; /* next place to search for a free cluster */
u_int pm_fatmult; /* these 2 values are used in fat */
@@ -108,7 +108,7 @@ struct msdosfsmount {
void *pm_w2u; /* Unicode->Local iconv handle */
void *pm_u2d; /* Unicode->DOS iconv handle */
void *pm_d2u; /* DOS->Local iconv handle */
- u_int32_t pm_nfileno; /* next 32-bit fileno */
+ uint32_t pm_nfileno; /* next 32-bit fileno */
RB_HEAD(msdosfs_filenotree, msdosfs_fileno)
pm_filenos; /* 64<->32-bit fileno mapping */
struct lock pm_fatlock; /* lockmgr protecting allocations and rb tree */
@@ -240,7 +240,7 @@ struct msdosfs_args {
mode_t mask; /* file mask to be applied for msdosfs perms */
int flags; /* see below */
int unused1; /* unused, was version number */
- u_int16_t unused2[128]; /* no longer used, was Local->Unicode table */
+ uint16_t unused2[128]; /* no longer used, was Local->Unicode table */
char *cs_win; /* Windows(Unicode) Charset */
char *cs_dos; /* DOS Charset */
char *cs_local; /* Local Charset */
More information about the svn-src-head
mailing list