aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/fdisk.c16
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),