Skip to contentSkip to conversation

fdisk: kernel/bios sectors and heads need not be global

PATCH Applied Davidlohr Bueso 2 participants 2 messages Apr 16, 2012 – Apr 23, 2012 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 3/8 fdisk: kernel/bios sectors and heads need not be global

From: Davidlohr Bueso <[email protected]>

---
 fdisk/fdisk.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
fdisk/fdisk.c +2 -3
index 0954028..1c0d7d8 100644
@@ -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);
Signature · 1 line
1.7.4.1
maintainer Applied
#1 lore raw
Quoted 2 lines · Davidlohr Bueso

fdisk/fdisk.c | 5 ++---

1 files changed, 2 insertions(+), 3 deletions(-)

Applied, thanks.

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com