aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-05-03 20:00:00 +0000
committerRob Landley <rob@landley.net>2006-05-03 20:00:00 +0000
commit2584e9b39f18c8d85730fc7eed96183495c32ecc (patch)
tree60e873715b20bf9698c537302249dc81c849cb41
parent0f0b645f7355e43bae0476acbee1363c94ed70bb (diff)
downloadbusybox-w32-2584e9b39f18c8d85730fc7eed96183495c32ecc.tar.gz
busybox-w32-2584e9b39f18c8d85730fc7eed96183495c32ecc.tar.bz2
busybox-w32-2584e9b39f18c8d85730fc7eed96183495c32ecc.zip
Remove HDIO_GETGEO_BIG which is dead (removed from 2.6) and was pointless back
in 2.4 (it fetched the same hd_geometry struct only with uint cylinders instead of ushort cylinders: nothing that big has ever accurately reported gemoetry, it's all LBA. Also stop declaring the hd_geometry struct static: it's two chars, a short, and a long for a grand total of 8 bytes. That can go on the stack.
-rw-r--r--miscutils/hdparm.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 5c02a347e..f237d32f5 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -2143,21 +2143,13 @@ static void process_dev(char *devname)
2143 } 2143 }
2144 if (verbose || get_geom) 2144 if (verbose || get_geom)
2145 { 2145 {
2146 static const char msg[] = " geometry = %u/%u/%u, sectors = %ld, start = %ld\n";
2147 static struct hd_geometry g;
2148#ifdef HDIO_GETGEO_BIG
2149 static struct hd_big_geometry bg;
2150#endif
2151
2152 if (!bb_ioctl(fd, BLKGETSIZE, &parm, "BLKGETSIZE")) 2146 if (!bb_ioctl(fd, BLKGETSIZE, &parm, "BLKGETSIZE"))
2153 { 2147 {
2154#ifdef HDIO_GETGEO_BIG 2148 struct hd_geometry g;
2155 if (!bb_ioctl(fd, HDIO_GETGEO_BIG, &bg, "HDIO_GETGEO_BIG")) 2149
2156 printf(msg, bg.cylinders, bg.heads, bg.sectors, parm, bg.start);
2157 else
2158#endif
2159 if (!bb_ioctl(fd, HDIO_GETGEO, &g, "HDIO_GETGEO")) 2150 if (!bb_ioctl(fd, HDIO_GETGEO, &g, "HDIO_GETGEO"))
2160 printf(msg, g.cylinders, g.heads, g.sectors, parm, g.start); 2151 printf(" geometry = %u/%u/%u, sectors = %ld, start = %ld\n",
2152 g.cylinders, g.heads, g.sectors, parm, g.start);
2161 } 2153 }
2162 } 2154 }
2163#ifdef HDIO_DRIVE_CMD 2155#ifdef HDIO_DRIVE_CMD