From: Davidlohr Bueso Date: Mon, 23 Apr 2012 10:38:22 +0000 (+0200) Subject: fdisk: kernel/bios sectors and heads need not be global X-Git-Tag: v2.22-rc1~502 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c867a8e3b3f3b579151570efa0cd4e1b95cf845b;p=thirdparty%2Futil-linux.git fdisk: kernel/bios sectors and heads need not be global Signed-off-by: Davidlohr Bueso --- diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c index 21fc2444c2..ab4845895c 100644 --- a/fdisk/fdisk.c +++ b/fdisk/fdisk.c @@ -225,8 +225,7 @@ int fd, /* the disk */ partitions = 4; /* maximum partition + 1 */ unsigned int user_cylinders, user_heads, user_sectors; -unsigned int pt_heads, pt_sectors; -unsigned int kern_heads, kern_sectors; +unsigned int pt_heads, pt_sectors; unsigned long long sector_offset = 1, extended_offset = 0, sectors; @@ -998,10 +997,10 @@ update_sector_offset(void) void get_geometry(int fd, struct geom *g) { unsigned long long llcyls, nsects = 0; + unsigned int kern_heads = 0, kern_sectors = 0; get_topology(fd); heads = cylinders = sectors = 0; - kern_heads = kern_sectors = 0; pt_heads = pt_sectors = 0; blkdev_get_geometry(fd, &kern_heads, &kern_sectors);