Bug #3369 ยป fdisk-cyls.patch
sbin/fdisk/fdisk.c | ||
---|---|---|
int j;
|
||
struct dos_partition *partp;
|
||
if (read_s0())
|
||
err(1, "read_s0");
|
||
printf("%s: %d cyl %d hd %d sec\n", disk, dos_cyls, dos_heads,
|
||
dos_sectors);
|
||
if (read_s0())
|
||
err(1, "read_s0");
|
||
printf("Part %11s %11s Type Flags\n", "Start", "Size");
|
||
for (j = 0; j < NDOSPART; j++) {
|
||
partp = ((struct dos_partition *) &mboot.parts) + j;
|
||
... | ... | |
cylsecs = heads * sectors;
|
||
}
|
||
} else {
|
||
cyls = partinfo.d_ncylinders;
|
||
cyls = partinfo.media_size / (partinfo.media_blksize * partinfo.d_nheads * partinfo.d_secpertrack);
|
||
heads = partinfo.d_nheads;
|
||
sectors = partinfo.d_secpertrack;
|
||
cylsecs = heads * sectors;
|