Lines Matching full:block
48 u_char block[DOSBOOTBLOCKSIZE]; in readboot() local
52 if ((size_t)read(dosfs, block, sizeof block) != sizeof block) { in readboot()
53 perr("could not read boot block"); in readboot()
57 if (block[510] != 0x55 || block[511] != 0xaa) { in readboot()
58 pfatal("Invalid signature in boot block: %02x%02x", in readboot()
59 block[511], block[510]); in readboot()
66 /* Decode BIOS Parameter Block */ in readboot()
69 boot->bpbBytesPerSec = block[11] + (block[12] << 8); in readboot()
78 boot->bpbSecPerClust = block[13]; in readboot()
85 boot->bpbResSectors = block[14] + (block[15] << 8); in readboot()
93 boot->bpbFATs = block[16]; in readboot()
100 boot->bpbRootDirEnts = block[17] + (block[18] << 8); in readboot()
107 boot->bpbSectors = block[19] + (block[20] << 8); in readboot()
115 boot->bpbMedia = block[21]; in readboot()
118 boot->bpbFATsmall = block[22] + (block[23] << 8); in readboot()
126 boot->SecPerTrack = block[24] + (block[25] << 8); in readboot()
127 boot->bpbHeads = block[26] + (block[27] << 8); in readboot()
130 boot->bpbHiddenSecs = block[28] + (block[29] << 8) + in readboot()
131 (block[30] << 16) + (block[31] << 24); in readboot()
134 boot->bpbHugeSectors = block[32] + (block[33] << 8) + in readboot()
135 (block[34] << 16) + (block[35] << 24); in readboot()
155 if (!memcmp(&block[3], "EXFAT ", 8)) { in readboot()
161 boot->FATsecs = block[36] + (block[37] << 8) in readboot()
162 + (block[38] << 16) + (block[39] << 24); in readboot()
164 if (block[40] & 0x80) in readboot()
165 boot->ValidFat = block[40] & 0x0f; in readboot()
168 if (block[42] || block[43]) { in readboot()
170 block[43], block[42]); in readboot()
179 boot->bpbRootClust = block[44] + (block[45] << 8) in readboot()
180 + (block[46] << 16) + (block[47] << 24); in readboot()
183 boot->bpbFSInfo = block[48] + (block[49] << 8); in readboot()
185 /* Sector number of the backup boot block, ignored */ in readboot()
186 boot->bpbBackup = block[50] + (block[51] << 8); in readboot()
191 * Either the BIOS Parameter Block has been corrupted, in readboot()
195 pfatal("Invalid FAT32 Extended BIOS Parameter Block"); in readboot()
199 /* Read in and verify the FSInfo block */ in readboot()
203 perr("could not read fsinfo block"); in readboot()
216 pwarn("Invalid signature in fsinfo block\n"); in readboot()
238 /* We appear to have a valid FSInfo block, decode */ in readboot()
344 perr("could not read fsinfo block"); in writefsinfo()
366 * support for FAT32) doesn't maintain the FSINFO block in writefsinfo()
369 * Therefore, we handle the FSINFO block only informally, in writefsinfo()