Fri Jan 22 22:53:36 2016 UTC ()
u_int{8,16,32}_t -> uint{8,16,32}_t, also u_int -> unsigned and
u_char -> unsigned char.


(dholland)
diff -r1.7 -r1.8 src/sys/fs/msdosfs/bpb.h
diff -r1.7 -r1.8 src/sys/fs/msdosfs/direntry.h

cvs diff -r1.7 -r1.8 src/sys/fs/msdosfs/bpb.h (expand / switch to unified diff)

--- src/sys/fs/msdosfs/bpb.h 2012/11/04 17:57:59 1.7
+++ src/sys/fs/msdosfs/bpb.h 2016/01/22 22:53:36 1.8
@@ -1,116 +1,116 @@ @@ -1,116 +1,116 @@
1/* $NetBSD: bpb.h,v 1.7 2012/11/04 17:57:59 jakllsch Exp $ */ 1/* $NetBSD: bpb.h,v 1.8 2016/01/22 22:53:36 dholland Exp $ */
2 2
3/* 3/*
4 * Written by Paul Popelka (paulp@uts.amdahl.com) 4 * Written by Paul Popelka (paulp@uts.amdahl.com)
5 * 5 *
6 * You can do anything you want with this software, just don't say you wrote 6 * You can do anything you want with this software, just don't say you wrote
7 * it, and don't remove this notice. 7 * it, and don't remove this notice.
8 * 8 *
9 * This software is provided "as is". 9 * This software is provided "as is".
10 * 10 *
11 * The author supplies this software to be publicly redistributed on the 11 * The author supplies this software to be publicly redistributed on the
12 * understanding that the author is not responsible for the correct 12 * understanding that the author is not responsible for the correct
13 * functioning of this software in any circumstances and is not liable for 13 * functioning of this software in any circumstances and is not liable for
14 * any damages caused by this software. 14 * any damages caused by this software.
15 * 15 *
16 * October 1992 16 * October 1992
17 */ 17 */
18 18
19#ifndef _MSDOSFS_BPB_H_ 19#ifndef _MSDOSFS_BPB_H_
20#define _MSDOSFS_BPB_H_ 20#define _MSDOSFS_BPB_H_
21 21
22/* 22/*
23 * BIOS Parameter Block (BPB) for DOS 3.3 23 * BIOS Parameter Block (BPB) for DOS 3.3
24 */ 24 */
25struct bpb33 { 25struct bpb33 {
26 u_int16_t bpbBytesPerSec; /* bytes per sector */ 26 uint16_t bpbBytesPerSec; /* bytes per sector */
27 u_int8_t bpbSecPerClust; /* sectors per cluster */ 27 uint8_t bpbSecPerClust; /* sectors per cluster */
28 u_int16_t bpbResSectors; /* number of reserved sectors */ 28 uint16_t bpbResSectors; /* number of reserved sectors */
29 u_int8_t bpbFATs; /* number of FATs */ 29 uint8_t bpbFATs; /* number of FATs */
30 u_int16_t bpbRootDirEnts; /* number of root directory entries */ 30 uint16_t bpbRootDirEnts; /* number of root directory entries */
31 u_int16_t bpbSectors; /* total number of sectors */ 31 uint16_t bpbSectors; /* total number of sectors */
32 u_int8_t bpbMedia; /* media descriptor */ 32 uint8_t bpbMedia; /* media descriptor */
33 u_int16_t bpbFATsecs; /* number of sectors per FAT */ 33 uint16_t bpbFATsecs; /* number of sectors per FAT */
34 u_int16_t bpbSecPerTrack; /* sectors per track */ 34 uint16_t bpbSecPerTrack; /* sectors per track */
35 u_int16_t bpbHeads; /* number of heads */ 35 uint16_t bpbHeads; /* number of heads */
36 u_int16_t bpbHiddenSecs; /* number of hidden sectors */ 36 uint16_t bpbHiddenSecs; /* number of hidden sectors */
37}; 37};
38 38
39/* 39/*
40 * BPB for DOS 5.0 The difference is bpbHiddenSecs is a short for DOS 3.3, 40 * BPB for DOS 5.0 The difference is bpbHiddenSecs is a short for DOS 3.3,
41 * and bpbHugeSectors is not in the 3.3 bpb. 41 * and bpbHugeSectors is not in the 3.3 bpb.
42 */ 42 */
43struct bpb50 { 43struct bpb50 {
44 u_int16_t bpbBytesPerSec; /* bytes per sector */ 44 uint16_t bpbBytesPerSec; /* bytes per sector */
45 u_int8_t bpbSecPerClust; /* sectors per cluster */ 45 uint8_t bpbSecPerClust; /* sectors per cluster */
46 u_int16_t bpbResSectors; /* number of reserved sectors */ 46 uint16_t bpbResSectors; /* number of reserved sectors */
47 u_int8_t bpbFATs; /* number of FATs */ 47 uint8_t bpbFATs; /* number of FATs */
48 u_int16_t bpbRootDirEnts; /* number of root directory entries */ 48 uint16_t bpbRootDirEnts; /* number of root directory entries */
49 u_int16_t bpbSectors; /* total number of sectors */ 49 uint16_t bpbSectors; /* total number of sectors */
50 u_int8_t bpbMedia; /* media descriptor */ 50 uint8_t bpbMedia; /* media descriptor */
51 u_int16_t bpbFATsecs; /* number of sectors per FAT */ 51 uint16_t bpbFATsecs; /* number of sectors per FAT */
52 u_int16_t bpbSecPerTrack; /* sectors per track */ 52 uint16_t bpbSecPerTrack; /* sectors per track */
53 u_int16_t bpbHeads; /* number of heads */ 53 uint16_t bpbHeads; /* number of heads */
54 u_int32_t bpbHiddenSecs; /* # of hidden sectors */ 54 uint32_t bpbHiddenSecs; /* # of hidden sectors */
55 u_int32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */ 55 uint32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */
56}; 56};
57 57
58/* 58/*
59 * BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50. 59 * BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50.
60 */ 60 */
61struct bpb710 { 61struct bpb710 {
62 u_int16_t bpbBytesPerSec; /* bytes per sector */ 62 uint16_t bpbBytesPerSec; /* bytes per sector */
63 u_int8_t bpbSecPerClust; /* sectors per cluster */ 63 uint8_t bpbSecPerClust; /* sectors per cluster */
64 u_int16_t bpbResSectors; /* number of reserved sectors */ 64 uint16_t bpbResSectors; /* number of reserved sectors */
65 u_int8_t bpbFATs; /* number of FATs */ 65 uint8_t bpbFATs; /* number of FATs */
66 u_int16_t bpbRootDirEnts; /* number of root directory entries */ 66 uint16_t bpbRootDirEnts; /* number of root directory entries */
67 u_int16_t bpbSectors; /* total number of sectors */ 67 uint16_t bpbSectors; /* total number of sectors */
68 u_int8_t bpbMedia; /* media descriptor */ 68 uint8_t bpbMedia; /* media descriptor */
69 u_int16_t bpbFATsecs; /* number of sectors per FAT */ 69 uint16_t bpbFATsecs; /* number of sectors per FAT */
70 u_int16_t bpbSecPerTrack; /* sectors per track */ 70 uint16_t bpbSecPerTrack; /* sectors per track */
71 u_int16_t bpbHeads; /* number of heads */ 71 uint16_t bpbHeads; /* number of heads */
72 u_int32_t bpbHiddenSecs; /* # of hidden sectors */ 72 uint32_t bpbHiddenSecs; /* # of hidden sectors */
73 u_int32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */ 73 uint32_t bpbHugeSectors; /* # of sectors if bpbSectors == 0 */
74 u_int32_t bpbBigFATsecs; /* like bpbFATsecs for FAT32 */ 74 uint32_t bpbBigFATsecs; /* like bpbFATsecs for FAT32 */
75 u_int16_t bpbExtFlags; /* extended flags: */ 75 uint16_t bpbExtFlags; /* extended flags: */
76#define FATNUM 0xf /* mask for numbering active FAT */ 76#define FATNUM 0xf /* mask for numbering active FAT */
77#define FATMIRROR 0x80 /* FAT is mirrored (like it always was) */ 77#define FATMIRROR 0x80 /* FAT is mirrored (like it always was) */
78 u_int16_t bpbFSVers; /* filesystem version */ 78 uint16_t bpbFSVers; /* filesystem version */
79#define FSVERS 0 /* currently only 0 is understood */ 79#define FSVERS 0 /* currently only 0 is understood */
80 u_int32_t bpbRootClust; /* start cluster for root directory */ 80 uint32_t bpbRootClust; /* start cluster for root directory */
81 u_int16_t bpbFSInfo; /* filesystem info structure sector */ 81 uint16_t bpbFSInfo; /* filesystem info structure sector */
82 u_int16_t bpbBackup; /* backup boot sector */ 82 uint16_t bpbBackup; /* backup boot sector */
83 u_int8_t bpbReserved[12]; /* Reserved for future expansion */ 83 uint8_t bpbReserved[12]; /* Reserved for future expansion */
84}; 84};
85 85
86#ifdef atari 86#ifdef atari
87/* 87/*
88 * BPB for GEMDOS filesystems. Atari leaves the obsolete stuff undefined. 88 * BPB for GEMDOS filesystems. Atari leaves the obsolete stuff undefined.
89 * Currently there is no need for a separate BPB structure. 89 * Currently there is no need for a separate BPB structure.
90 */ 90 */
91#if 0 91#if 0
92struct bpb_a { 92struct bpb_a {
93 u_int16_t bpbBytesPerSec; /* bytes per sector */ 93 uint16_t bpbBytesPerSec; /* bytes per sector */
94 u_int8_t bpbSecPerClust; /* sectors per cluster */ 94 uint8_t bpbSecPerClust; /* sectors per cluster */
95 u_int16_t bpbResSectors; /* number of reserved sectors */ 95 uint16_t bpbResSectors; /* number of reserved sectors */
96 u_int8_t bpbFATs; /* number of FATs */ 96 uint8_t bpbFATs; /* number of FATs */
97 u_int16_t bpbRootDirEnts; /* number of root directory entries */ 97 uint16_t bpbRootDirEnts; /* number of root directory entries */
98 u_int16_t bpbSectors; /* total number of sectors */ 98 uint16_t bpbSectors; /* total number of sectors */
99 u_int8_t bpbUseless1; /* meaningless on GEMDOS FS */ 99 uint8_t bpbUseless1; /* meaningless on GEMDOS FS */
100 u_int16_t bpbFATsecs; /* number of sectors per FAT */ 100 uint16_t bpbFATsecs; /* number of sectors per FAT */
101 u_int16_t bpbUseless2; /* meaningless for harddisk fs */ 101 uint16_t bpbUseless2; /* meaningless for harddisk fs */
102 u_int16_t bpbUseless3; /* meaningless for harddisk fs */ 102 uint16_t bpbUseless3; /* meaningless for harddisk fs */
103 u_int16_t bpbHiddenSecs; /* the TOS-BIOS ignores this */ 103 uint16_t bpbHiddenSecs; /* the TOS-BIOS ignores this */
104}; 104};
105#endif 105#endif
106#endif /* atari */ 106#endif /* atari */
107 107
108/* 108/*
109 * The following structures represent how the bpb's look on disk. shorts 109 * The following structures represent how the bpb's look on disk. shorts
110 * and longs are just character arrays of the appropriate length. This is 110 * and longs are just character arrays of the appropriate length. This is
111 * because the compiler forces shorts and longs to align on word or 111 * because the compiler forces shorts and longs to align on word or
112 * halfword boundaries. 112 * halfword boundaries.
113 */ 113 */
114 114
115#include <sys/endian.h> 115#include <sys/endian.h>
116 116
@@ -149,49 +149,49 @@ struct byte_bpb50 { @@ -149,49 +149,49 @@ struct byte_bpb50 {
149 int8_t bpbSectors[2]; /* total number of sectors */ 149 int8_t bpbSectors[2]; /* total number of sectors */
150 int8_t bpbMedia; /* media descriptor */ 150 int8_t bpbMedia; /* media descriptor */
151 int8_t bpbFATsecs[2]; /* number of sectors per FAT */ 151 int8_t bpbFATsecs[2]; /* number of sectors per FAT */
152 int8_t bpbSecPerTrack[2]; /* sectors per track */ 152 int8_t bpbSecPerTrack[2]; /* sectors per track */
153 int8_t bpbHeads[2]; /* number of heads */ 153 int8_t bpbHeads[2]; /* number of heads */
154 int8_t bpbHiddenSecs[4]; /* number of hidden sectors */ 154 int8_t bpbHiddenSecs[4]; /* number of hidden sectors */
155 int8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */ 155 int8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */
156}; 156};
157 157
158/* 158/*
159 * BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50. 159 * BPB for DOS 7.10 (FAT32). This one has a few extensions to bpb50.
160 */ 160 */
161struct byte_bpb710 { 161struct byte_bpb710 {
162 u_int8_t bpbBytesPerSec[2]; /* bytes per sector */ 162 uint8_t bpbBytesPerSec[2]; /* bytes per sector */
163 u_int8_t bpbSecPerClust; /* sectors per cluster */ 163 uint8_t bpbSecPerClust; /* sectors per cluster */
164 u_int8_t bpbResSectors[2]; /* number of reserved sectors */ 164 uint8_t bpbResSectors[2]; /* number of reserved sectors */
165 u_int8_t bpbFATs; /* number of FATs */ 165 uint8_t bpbFATs; /* number of FATs */
166 u_int8_t bpbRootDirEnts[2]; /* number of root directory entries */ 166 uint8_t bpbRootDirEnts[2]; /* number of root directory entries */
167 u_int8_t bpbSectors[2]; /* total number of sectors */ 167 uint8_t bpbSectors[2]; /* total number of sectors */
168 u_int8_t bpbMedia; /* media descriptor */ 168 uint8_t bpbMedia; /* media descriptor */
169 u_int8_t bpbFATsecs[2]; /* number of sectors per FAT */ 169 uint8_t bpbFATsecs[2]; /* number of sectors per FAT */
170 u_int8_t bpbSecPerTrack[2]; /* sectors per track */ 170 uint8_t bpbSecPerTrack[2]; /* sectors per track */
171 u_int8_t bpbHeads[2]; /* number of heads */ 171 uint8_t bpbHeads[2]; /* number of heads */
172 u_int8_t bpbHiddenSecs[4]; /* # of hidden sectors */ 172 uint8_t bpbHiddenSecs[4]; /* # of hidden sectors */
173 u_int8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */ 173 uint8_t bpbHugeSectors[4]; /* # of sectors if bpbSectors == 0 */
174 u_int8_t bpbBigFATsecs[4]; /* like bpbFATsecs for FAT32 */ 174 uint8_t bpbBigFATsecs[4]; /* like bpbFATsecs for FAT32 */
175 u_int8_t bpbExtFlags[2]; /* extended flags: */ 175 uint8_t bpbExtFlags[2]; /* extended flags: */
176 u_int8_t bpbFSVers[2]; /* filesystem version */ 176 uint8_t bpbFSVers[2]; /* filesystem version */
177 u_int8_t bpbRootClust[4]; /* start cluster for root directory */ 177 uint8_t bpbRootClust[4]; /* start cluster for root directory */
178 u_int8_t bpbFSInfo[2]; /* filesystem info structure sector */ 178 uint8_t bpbFSInfo[2]; /* filesystem info structure sector */
179 u_int8_t bpbBackup[2]; /* backup boot sector */ 179 uint8_t bpbBackup[2]; /* backup boot sector */
180 u_int8_t bpbReserved[12]; /* Reserved for future expansion */ 180 uint8_t bpbReserved[12]; /* Reserved for future expansion */
181}; 181};
182 182
183/* 183/*
184 * FAT32 FSInfo block. 184 * FAT32 FSInfo block.
185 */ 185 */
186struct fsinfo { 186struct fsinfo {
187 u_int8_t fsisig1[4]; 187 uint8_t fsisig1[4];
188 u_int8_t fsifill1[480]; 188 uint8_t fsifill1[480];
189 u_int8_t fsisig2[4]; 189 uint8_t fsisig2[4];
190 u_int8_t fsinfree[4]; 190 uint8_t fsinfree[4];
191 u_int8_t fsinxtfree[4]; 191 uint8_t fsinxtfree[4];
192 u_int8_t fsifill2[12]; 192 uint8_t fsifill2[12];
193 u_int8_t fsisig3[4]; 193 uint8_t fsisig3[4];
194 u_int8_t fsifill3[508]; 194 uint8_t fsifill3[508];
195 u_int8_t fsisig4[4]; 195 uint8_t fsisig4[4];
196}; 196};
197#endif /* _MSDOSFS_BPB_H_ */ 197#endif /* _MSDOSFS_BPB_H_ */

cvs diff -r1.7 -r1.8 src/sys/fs/msdosfs/direntry.h (expand / switch to unified diff)

--- src/sys/fs/msdosfs/direntry.h 2013/10/20 00:01:55 1.7
+++ src/sys/fs/msdosfs/direntry.h 2016/01/22 22:53:36 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: direntry.h,v 1.7 2013/10/20 00:01:55 christos Exp $ */ 1/* $NetBSD: direntry.h,v 1.8 2016/01/22 22:53:36 dholland Exp $ */
2 2
3/*- 3/*-
4 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. 4 * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
5 * Copyright (C) 1994, 1995, 1997 TooLs GmbH. 5 * Copyright (C) 1994, 1995, 1997 TooLs GmbH.
6 * All rights reserved. 6 * All rights reserved.
7 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below). 7 * Original code by Paul Popelka (paulp@uts.amdahl.com) (see below).
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -43,72 +43,72 @@ @@ -43,72 +43,72 @@
43 * understanding that the author is not responsible for the correct 43 * understanding that the author is not responsible for the correct
44 * functioning of this software in any circumstances and is not liable for 44 * functioning of this software in any circumstances and is not liable for
45 * any damages caused by this software. 45 * any damages caused by this software.
46 * 46 *
47 * October 1992 47 * October 1992
48 */ 48 */
49#ifndef _MSDOSFS_DIRENTRY_H_ 49#ifndef _MSDOSFS_DIRENTRY_H_
50#define _MSDOSFS_DIRENTRY_H_ 50#define _MSDOSFS_DIRENTRY_H_
51 51
52/* 52/*
53 * Structure of a dos directory entry. 53 * Structure of a dos directory entry.
54 */ 54 */
55struct direntry { 55struct direntry {
56 u_int8_t deName[8]; /* filename, blank filled */ 56 uint8_t deName[8]; /* filename, blank filled */
57#define SLOT_EMPTY 0x00 /* slot has never been used */ 57#define SLOT_EMPTY 0x00 /* slot has never been used */
58#define SLOT_E5 0x05 /* the real value is 0xe5 */ 58#define SLOT_E5 0x05 /* the real value is 0xe5 */
59#define SLOT_DELETED 0xe5 /* file in this slot deleted */ 59#define SLOT_DELETED 0xe5 /* file in this slot deleted */
60 u_int8_t deExtension[3]; /* extension, blank filled */ 60 uint8_t deExtension[3]; /* extension, blank filled */
61 u_int8_t deAttributes; /* file attributes */ 61 uint8_t deAttributes; /* file attributes */
62#define ATTR_NORMAL 0x00 /* normal file */ 62#define ATTR_NORMAL 0x00 /* normal file */
63#define ATTR_READONLY 0x01 /* file is readonly */ 63#define ATTR_READONLY 0x01 /* file is readonly */
64#define ATTR_HIDDEN 0x02 /* file is hidden */ 64#define ATTR_HIDDEN 0x02 /* file is hidden */
65#define ATTR_SYSTEM 0x04 /* file is a system file */ 65#define ATTR_SYSTEM 0x04 /* file is a system file */
66#define ATTR_VOLUME 0x08 /* entry is a volume label */ 66#define ATTR_VOLUME 0x08 /* entry is a volume label */
67#define ATTR_DIRECTORY 0x10 /* entry is a directory name */ 67#define ATTR_DIRECTORY 0x10 /* entry is a directory name */
68#define ATTR_ARCHIVE 0x20 /* file is new or modified */ 68#define ATTR_ARCHIVE 0x20 /* file is new or modified */
69 u_int8_t deReserved; /* reserved */ 69 uint8_t deReserved; /* reserved */
70 u_int8_t deCHundredth; /* hundredth of seconds in CTime */ 70 uint8_t deCHundredth; /* hundredth of seconds in CTime */
71 u_int8_t deCTime[2]; /* create time */ 71 uint8_t deCTime[2]; /* create time */
72 u_int8_t deCDate[2]; /* create date */ 72 uint8_t deCDate[2]; /* create date */
73 u_int8_t deADate[2]; /* access date */ 73 uint8_t deADate[2]; /* access date */
74 u_int8_t deHighClust[2]; /* high bytes of cluster number */ 74 uint8_t deHighClust[2]; /* high bytes of cluster number */
75 u_int8_t deMTime[2]; /* last update time */ 75 uint8_t deMTime[2]; /* last update time */
76 u_int8_t deMDate[2]; /* last update date */ 76 uint8_t deMDate[2]; /* last update date */
77 u_int8_t deStartCluster[2]; /* starting cluster of file */ 77 uint8_t deStartCluster[2]; /* starting cluster of file */
78 u_int8_t deFileSize[4]; /* size of file in bytes */ 78 uint8_t deFileSize[4]; /* size of file in bytes */
79}; 79};
80 80
81static __inline uint8_t 81static __inline uint8_t
82msdos_dirchar(const struct direntry *de, size_t i) { 82msdos_dirchar(const struct direntry *de, size_t i) {
83 return i < sizeof(de->deName) ? de->deName[i] : 83 return i < sizeof(de->deName) ? de->deName[i] :
84 de->deExtension[i - sizeof(de->deName)]; 84 de->deExtension[i - sizeof(de->deName)];
85} 85}
86 86
87/* 87/*
88 * Structure of a Win95 long name directory entry 88 * Structure of a Win95 long name directory entry
89 */ 89 */
90struct winentry { 90struct winentry {
91 u_int8_t weCnt; 91 uint8_t weCnt;
92#define WIN_LAST 0x40 92#define WIN_LAST 0x40
93#define WIN_CNT 0x3f 93#define WIN_CNT 0x3f
94 u_int8_t wePart1[10]; 94 uint8_t wePart1[10];
95 u_int8_t weAttributes; 95 uint8_t weAttributes;
96#define ATTR_WIN95 0x0f 96#define ATTR_WIN95 0x0f
97 u_int8_t weReserved1; 97 uint8_t weReserved1;
98 u_int8_t weChksum; 98 uint8_t weChksum;
99 u_int8_t wePart2[12]; 99 uint8_t wePart2[12];
100 u_int16_t weReserved2; 100 uint16_t weReserved2;
101 u_int8_t wePart3[4]; 101 uint8_t wePart3[4];
102}; 102};
103#define WIN_CHARS 13 /* Number of chars per winentry */ 103#define WIN_CHARS 13 /* Number of chars per winentry */
104 104
105/* 105/*
106 * This is the format of the contents of the deTime field in the direntry 106 * This is the format of the contents of the deTime field in the direntry
107 * structure. 107 * structure.
108 * We don't use bitfields because we don't know how compilers for 108 * We don't use bitfields because we don't know how compilers for
109 * arbitrary machines will lay them out. 109 * arbitrary machines will lay them out.
110 */ 110 */
111#define DT_2SECONDS_MASK 0x1F /* seconds divided by 2 */ 111#define DT_2SECONDS_MASK 0x1F /* seconds divided by 2 */
112#define DT_2SECONDS_SHIFT 0 112#define DT_2SECONDS_SHIFT 0
113#define DT_MINUTES_MASK 0x7E0 /* minutes */ 113#define DT_MINUTES_MASK 0x7E0 /* minutes */
114#define DT_MINUTES_SHIFT 5 114#define DT_MINUTES_SHIFT 5
@@ -118,29 +118,29 @@ struct winentry { @@ -118,29 +118,29 @@ struct winentry {
118/* 118/*
119 * This is the format of the contents of the deDate field in the direntry 119 * This is the format of the contents of the deDate field in the direntry
120 * structure. 120 * structure.
121 */ 121 */
122#define DD_DAY_MASK 0x1F /* day of month */ 122#define DD_DAY_MASK 0x1F /* day of month */
123#define DD_DAY_SHIFT 0 123#define DD_DAY_SHIFT 0
124#define DD_MONTH_MASK 0x1E0 /* month */ 124#define DD_MONTH_MASK 0x1E0 /* month */
125#define DD_MONTH_SHIFT 5 125#define DD_MONTH_SHIFT 5
126#define DD_YEAR_MASK 0xFE00 /* year - 1980 */ 126#define DD_YEAR_MASK 0xFE00 /* year - 1980 */
127#define DD_YEAR_SHIFT 9 127#define DD_YEAR_SHIFT 9
128 128
129#if defined(_KERNEL) || defined(MAKEFS) 129#if defined(_KERNEL) || defined(MAKEFS)
130struct dirent; 130struct dirent;
131void unix2dostime(const struct timespec *tsp, int gmtoff, u_int16_t *ddp, 131void unix2dostime(const struct timespec *tsp, int gmtoff, uint16_t *ddp,
132 u_int16_t *dtp, u_int8_t *dhp); 132 uint16_t *dtp, uint8_t *dhp);
133void dos2unixtime(u_int dd, u_int dt, u_int dh, int gmtoff, 133void dos2unixtime(unsigned dd, unsigned dt, unsigned dh, int gmtoff,
134 struct timespec *tsp); 134 struct timespec *tsp);
135int dos2unixfn(u_char dn[11], u_char *un, int lower); 135int dos2unixfn(unsigned char dn[11], unsigned char *un, int lower);
136int unix2dosfn(const u_char *un, u_char dn[12], int unlen, 136int unix2dosfn(const unsigned char *un, unsigned char dn[12], int unlen,
137 u_int gen); 137 unsigned gen);
138int unix2winfn(const u_char *un, int unlen, struct winentry *wep, 138int unix2winfn(const unsigned char *un, int unlen, struct winentry *wep,
139 int cnt, int chksum); 139 int cnt, int chksum);
140int winChkName(const u_char *un, int unlen, struct winentry *wep, 140int winChkName(const unsigned char *un, int unlen, struct winentry *wep,
141 int chksum); 141 int chksum);
142int win2unixfn(struct winentry *wep, struct dirent *dp, int chksum); 142int win2unixfn(struct winentry *wep, struct dirent *dp, int chksum);
143u_int8_t winChksum(u_int8_t *name); 143uint8_t winChksum(uint8_t *name);
144int winSlotCnt(const u_char *un, int unlen); 144int winSlotCnt(const unsigned char *un, int unlen);
145#endif /* _KERNEL || MAKEFS */ 145#endif /* _KERNEL || MAKEFS */
146#endif /* _MSDOSFS_DIRENTRY_H_ */ 146#endif /* _MSDOSFS_DIRENTRY_H_ */