diff options
author | phk <phk@FreeBSD.org> | 2002-10-27 10:33:38 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-10-27 10:33:38 +0000 |
commit | c9805dcdfb391e619bc3f9a1ae0dcde7c19b3711 (patch) | |
tree | 8d06ec043562ffcac15496af434b6d0706d2b224 /sbin/fdisk | |
parent | 4772146a86513f884a2afd38cf32907618c388a0 (diff) | |
download | FreeBSD-src-c9805dcdfb391e619bc3f9a1ae0dcde7c19b3711.zip FreeBSD-src-c9805dcdfb391e619bc3f9a1ae0dcde7c19b3711.tar.gz |
Don't attempt to find the geometry with disklabel based ioctl, it just
issues a useless warning now.
Diffstat (limited to 'sbin/fdisk')
-rw-r--r-- | sbin/fdisk/fdisk.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 59572f6..5f1b5f9 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -73,8 +73,6 @@ static int secsize = 0; /* the sensed sector size */ static char *disk; -static struct disklabel disklabel; /* disk parameters */ - static int cyls, sectors, heads, cylsecs, disksecs; struct mboot { @@ -754,18 +752,6 @@ get_params() u_int u; off_t o; - if (ioctl(fd, DIOCGDINFO, &disklabel) == -1) { - warnx("can't get disk parameters on %s; supplying dummy ones", disk); - dos_cyls = cyls = 1; - dos_heads = heads = 1; - dos_sectors = sectors = 1; - dos_cylsecs = cylsecs = heads * sectors; - disksecs = cyls * heads * sectors; - } else { - dos_cyls = cyls = disklabel.d_ncylinders; - dos_heads = heads = disklabel.d_ntracks; - dos_sectors = sectors = disklabel.d_nsectors; - } error = ioctl(fd, DIOCGFWSECTORS, &u); if (error == 0) sectors = dos_sectors = u; @@ -786,7 +772,6 @@ get_params() cyls = dos_cyls = o / (u * dos_heads * dos_sectors); } - return (disksecs); } |