summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisksgilabel.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:13 +0100
committerKarel Zak2006-12-07 00:26:13 +0100
commita21409f54e0d600a5e40dc4f176eddac3f7172ee (patch)
tree18199c4d9422be72130f4b81c2d16fa880cccefd /fdisk/fdisksgilabel.c
parentImported from util-linux-2.12 tarball. (diff)
downloadkernel-qcow2-util-linux-a21409f54e0d600a5e40dc4f176eddac3f7172ee.tar.gz
kernel-qcow2-util-linux-a21409f54e0d600a5e40dc4f176eddac3f7172ee.tar.xz
kernel-qcow2-util-linux-a21409f54e0d600a5e40dc4f176eddac3f7172ee.zip
Imported from util-linux-2.12pre tarball.
Diffstat (limited to 'fdisk/fdisksgilabel.c')
-rw-r--r--fdisk/fdisksgilabel.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c
index 2359e17bf..ce05418e5 100644
--- a/fdisk/fdisksgilabel.c
+++ b/fdisk/fdisksgilabel.c
@@ -190,10 +190,12 @@ check_sgi_label() {
void
sgi_list_table(int xtra) {
- int i, w, wd;
+ int i, w;
int kpi = 0; /* kernel partition ID */
char *type;
+ w = strlen(disk_device);
+
if (xtra) {
printf(_("\nDisk %s (SGI disk label): %d heads, %d sectors\n"
"%d cylinders, %d physical cylinders\n"
@@ -213,15 +215,9 @@ 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 + 2, _("Device"));
+ w + 1, _("Device"));
for (i = 0 ; i < partitions; i++) {
if (sgi_get_num_sectors(i) || debug) {
__u32 start = sgi_get_start_sector(i);
@@ -230,7 +226,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+3),
+/* device */ partname(disk_device, kpi, w+2),
/* flags */ (sgi_get_swappartition() == i) ? "swap" :
/* flags */ (sgi_get_bootpartition() == i) ? "boot" : " ",
/* start */ (long) scround(start),