Lines Matching refs:fsinfo
48 u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; in readboot() local
132 || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { in readboot()
136 if (memcmp(fsinfo, "RRaA", 4) in readboot()
137 || memcmp(fsinfo + 0x1e4, "rrAa", 4) in readboot()
138 || fsinfo[0x1fc] in readboot()
139 || fsinfo[0x1fd] in readboot()
140 || fsinfo[0x1fe] != 0x55 in readboot()
141 || fsinfo[0x1ff] != 0xaa in readboot()
142 || fsinfo[0x3fc] in readboot()
143 || fsinfo[0x3fd] in readboot()
144 || fsinfo[0x3fe] != 0x55 in readboot()
145 || fsinfo[0x3ff] != 0xaa) { in readboot()
148 memcpy(fsinfo, "RRaA", 4); in readboot()
149 memcpy(fsinfo + 0x1e4, "rrAa", 4); in readboot()
150 fsinfo[0x1fc] = fsinfo[0x1fd] = 0; in readboot()
151 fsinfo[0x1fe] = 0x55; in readboot()
152 fsinfo[0x1ff] = 0xaa; in readboot()
153 fsinfo[0x3fc] = fsinfo[0x3fd] = 0; in readboot()
154 fsinfo[0x3fe] = 0x55; in readboot()
155 fsinfo[0x3ff] = 0xaa; in readboot()
159 || write(dosfs, fsinfo, sizeof fsinfo) in readboot()
160 != sizeof fsinfo) { in readboot()
169 boot->FSFree = fsinfo[0x1e8] + (fsinfo[0x1e9] << 8) in readboot()
170 + (fsinfo[0x1ea] << 16) in readboot()
171 + (fsinfo[0x1eb] << 24); in readboot()
172 boot->FSNext = fsinfo[0x1ec] + (fsinfo[0x1ed] << 8) in readboot()
173 + (fsinfo[0x1ee] << 16) in readboot()
174 + (fsinfo[0x1ef] << 24); in readboot()
262 u_char fsinfo[2 * DOSBOOTBLOCKSIZE]; in writefsinfo() local
266 || read(dosfs, fsinfo, sizeof fsinfo) != sizeof fsinfo) { in writefsinfo()
270 fsinfo[0x1e8] = (u_char)boot->FSFree; in writefsinfo()
271 fsinfo[0x1e9] = (u_char)(boot->FSFree >> 8); in writefsinfo()
272 fsinfo[0x1ea] = (u_char)(boot->FSFree >> 16); in writefsinfo()
273 fsinfo[0x1eb] = (u_char)(boot->FSFree >> 24); in writefsinfo()
274 fsinfo[0x1ec] = (u_char)boot->FSNext; in writefsinfo()
275 fsinfo[0x1ed] = (u_char)(boot->FSNext >> 8); in writefsinfo()
276 fsinfo[0x1ee] = (u_char)(boot->FSNext >> 16); in writefsinfo()
277 fsinfo[0x1ef] = (u_char)(boot->FSNext >> 24); in writefsinfo()
280 || write(dosfs, fsinfo, sizeof fsinfo) in writefsinfo()
281 != sizeof fsinfo) { in writefsinfo()