diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-08-08 20:04:56 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-08-08 20:04:56 +0000 |
commit | 99a75d13762f5a090058d4840c7afe6ee4bf5966 (patch) | |
tree | 6e5284795f8b8ffa1f516ca410364a004e193afb | |
parent | de6a6ae876ce7a501f8d9a948a59163b83a3766e (diff) | |
download | busybox-99a75d13762f5a090058d4840c7afe6ee4bf5966.tar.gz |
Patch from Kent Robotti to being fdisk in sync with v2.12 final.
-rw-r--r-- | util-linux/fdisk.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index a8e1ac857..02c5c10ff 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c @@ -10,7 +10,7 @@ * Vladimir Oleynik <dzo@simtreas.ru> 2001,2002 Busybox port */ -#define UTIL_LINUX_VERSION "2.12pre" +#define UTIL_LINUX_VERSION "2.12" #define PROC_PARTITIONS "/proc/partitions" @@ -1925,11 +1925,9 @@ sgi_get_swappartition(void) static void sgi_list_table(int xtra) { - int i, w; + int i, w, wd; int kpi = 0; /* kernel partition ID */ - w = strlen(disk_device); - if(xtra) { printf(_("\nDisk %s (SGI disk label): %d heads, %d sectors\n" "%d cylinders, %d physical cylinders\n" @@ -1949,9 +1947,15 @@ sgi_list_table(int xtra) { disk_device, heads, sectors, cylinders, str_units(PLURAL), units_per_sector ); } + + w = strlen(disk_device); + wd = strlen(_("Device")); + if (w < wd) + w = wd; + printf(_("----- partitions -----\n" "Pt# %*s Info Start End Sectors Id System\n"), - w + 1, _("Device")); + w + 2, _("Device")); for (i = 0 ; i < partitions; i++) { if( sgi_get_num_sectors(i) || debug ) { uint32_t start = sgi_get_start_sector(i); @@ -1960,7 +1964,7 @@ sgi_list_table(int xtra) { printf( "%2d: %s %4s %9ld %9ld %9ld %2x %s\n", /* fdisk part number */ i+1, -/* device */ partname(disk_device, kpi, w+2), +/* device */ partname(disk_device, kpi, w+3), /* flags */ (sgi_get_swappartition() == i) ? "swap" : /* flags */ (sgi_get_bootpartition() == i) ? "boot" : " ", /* start */ (long) scround(start), |