diff options
author | Francesco Cosoleto | 2011-08-17 13:21:12 +0200 |
---|---|---|
committer | Karel Zak | 2011-08-30 10:53:22 +0200 |
commit | 20aa2570e81b3254e492f4ec7ccaaa4933603081 (patch) | |
tree | db988db96d812b535c9c097d6afdb8faa333a905 /fdisk/fdisksgilabel.c | |
parent | build-sys: don't install ru/ddate.1 if ddate disabled (diff) | |
download | kernel-qcow2-util-linux-20aa2570e81b3254e492f4ec7ccaaa4933603081.tar.gz kernel-qcow2-util-linux-20aa2570e81b3254e492f4ec7ccaaa4933603081.tar.xz kernel-qcow2-util-linux-20aa2570e81b3254e492f4ec7ccaaa4933603081.zip |
fdisk: print a message with size and type of created partition
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Diffstat (limited to 'fdisk/fdisksgilabel.c')
-rw-r--r-- | fdisk/fdisksgilabel.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fdisk/fdisksgilabel.c b/fdisk/fdisksgilabel.c index 8179bc155..359590916 100644 --- a/fdisk/fdisksgilabel.c +++ b/fdisk/fdisksgilabel.c @@ -570,6 +570,8 @@ sgi_set_partition(int i, unsigned int start, unsigned int length, int sys) { set_changed(i); if (sgi_gaps() < 0) /* rebuild freelist */ printf(_("Do You know, You got a partition overlap on the disk?\n")); + if (length) + print_partition_size(i + 1, start, start + length, sys); } static void @@ -733,7 +735,6 @@ create_sgilabel(void) old[i].sysid = get_part_table(i)->sys_ind; old[i].start = get_start_sect(get_part_table(i)); old[i].nsect = get_nr_sects(get_part_table(i)); - printf(_("Trying to keep parameters of partition %d.\n"), i); if (debug) printf(_("ID=%02x\tSTART=%d\tLENGTH=%d\n"), old[i].sysid, old[i].start, old[i].nsect); @@ -741,6 +742,12 @@ create_sgilabel(void) } } + for (i = 0; i < 4; i++) + if (old[i].sysid) { + printf(_("Trying to keep parameters of partitions already set.\n")); + break; + } + zeroize_mbr_buffer(); sgilabel->magic = SSWAP32(SGI_LABEL_MAGIC); sgilabel->boot_part = SSWAP16(0); |