Lines Matching refs:bs

89 	struct bootsec	bs;  member
107 #define PC_BPSEC(h) ltohs((h)->bs.bps[0])
108 #define PC_RESSEC(h) ltohs((h)->bs.res_sec[0])
109 #define PC_NROOTENT(h) ltohs((h)->bs.rdirents[0])
110 #define PC_NSEC(h) ltohs((h)->bs.numsect[0])
221 bcopy(buf, &h->bs, sizeof (h->bs)); in read_bootsec()
225 h->bs.fatsec = ltohs(h->bs.fatsec); in read_bootsec()
226 h->bs.spt = ltohs(h->bs.spt); in read_bootsec()
227 h->bs.nhead = ltohs(h->bs.nhead); in read_bootsec()
228 h->bs.hiddensec = ltohi(h->bs.hiddensec); in read_bootsec()
229 h->bs.totalsec = ltohi(h->bs.totalsec); in read_bootsec()
245 switch (h->bs.mediadesriptor) { in valid_media()
268 (h->bs.fatsec > 0) && in well_formed()
269 ((PC_NSEC(h) == 0 && h->bs.totalsec > 0) || in well_formed()
275 (h->bs.fatsec == 0 && h->bs32.f_fatlength > 0) && in well_formed()
276 ((PC_NSEC(h) == 0 && h->bs.totalsec > 0) || in well_formed()
279 fatmatch = (PC_NSEC(h) > 0 && h->bs.fatsec > 0); in well_formed()
283 h->bs.spcl > 0 && PC_RESSEC(h) >= 1 && h->bs.nfat > 0); in well_formed()
292 h->TotSec = h->bs.totalsec; in calculate_parameters()
294 if (h->bs.fatsec != 0) { in calculate_parameters()
295 h->FATSz = h->bs.fatsec; in calculate_parameters()
299 if ((h->bps == 0) || (h->bs.spcl == 0)) { in calculate_parameters()
305 PC_RESSEC(h) + h->bs.nfat * h->FATSz + h->RootDirSectors; in calculate_parameters()
307 h->CountOfClusters = h->DataSec / h->bs.spcl; in calculate_parameters()
363 FirstRootDirSecNum = PC_RESSEC(h) + h->bs.nfat * h->bs.fatsec; in get_label_16()
402 clustersize = h->bs.spcl * h->bps; in get_label_32()
410 (n - 2) * h->bs.spcl + h->FirstDataSector; in get_label_32()
509 h->bps, h->bs.spcl); in dumpfs()
512 (unsigned short)PC_RESSEC(h), h->bs.nfat); in dumpfs()
518 h->bs.fatsec, h->bs.spt); in dumpfs()
521 h->bs.nhead, h->bs.hiddensec); in dumpfs()
525 (void) fprintf(fout, "Media Type: 0x%x ", h->bs.mediadesriptor); in dumpfs()
527 switch (h->bs.mediadesriptor) { in dumpfs()
582 ADD_UINT32(h, "sectors_per_cluster", h->bs.spcl); in get_attr()
584 ADD_UINT32(h, "fats", h->bs.nfat); in get_attr()
587 ADD_UINT32(h, "media", h->bs.mediadesriptor); in get_attr()
588 ADD_UINT32(h, "fat_size_16", h->bs.fatsec); in get_attr()
589 ADD_UINT32(h, "sectors_per_track", h->bs.spt); in get_attr()
590 ADD_UINT32(h, "heads", h->bs.nhead); in get_attr()
591 ADD_UINT32(h, "hidden_sectors", h->bs.hiddensec); in get_attr()
592 ADD_UINT32(h, "total_sectors_32", h->bs.totalsec); in get_attr()