summaryrefslogtreecommitdiffstats
path: root/fdisk/fdisk.c
diff options
context:
space:
mode:
authorFrancesco Cosoleto2011-08-17 00:19:03 +0200
committerKarel Zak2011-08-30 10:53:39 +0200
commita75ba1319e8443cd54d19d08b2b9904c4be5e958 (patch)
tree51110c805539a26dd7c857ad8a431de34a90bc60 /fdisk/fdisk.c
parentfdisk: print a message with size and type of created partition (diff)
downloadkernel-qcow2-util-linux-a75ba1319e8443cd54d19d08b2b9904c4be5e958.tar.gz
kernel-qcow2-util-linux-a75ba1319e8443cd54d19d08b2b9904c4be5e958.tar.xz
kernel-qcow2-util-linux-a75ba1319e8443cd54d19d08b2b9904c4be5e958.zip
fdisk: print partition deleted message
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Diffstat (limited to 'fdisk/fdisk.c')
-rw-r--r--fdisk/fdisk.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index a08a4d413..d3fc20010 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -1676,27 +1676,18 @@ delete_partition(int i) {
return; /* C/H/S not set */
pe->changed = 1;
- if (disklabel == SUN_LABEL) {
+ if (disklabel == SUN_LABEL)
sun_delete_partition(i);
- return;
- }
-
- if (disklabel == SGI_LABEL) {
+ else if (disklabel == SGI_LABEL)
sgi_delete_partition(i);
- return;
- }
-
- if (i < 4) {
+ else if (i < 4) {
if (IS_EXTENDED (p->sys_ind) && i == ext_index) {
partitions = 4;
ptes[ext_index].ext_pointer = NULL;
extended_offset = 0;
}
clear_partition(p);
- return;
- }
-
- if (!q->sys_ind && i > 4) {
+ } else if (!q->sys_ind && i > 4) {
/* the last one in the chain - just delete */
--partitions;
--i;
@@ -1733,6 +1724,7 @@ delete_partition(int i) {
/* the only logical: clear only */
clear_partition(ptes[i].part_table);
}
+ printf(_("Partition %d is deleted\n"), i + 1);
}
static void