]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: print partition deleted message
authorFrancesco Cosoleto <cosoleto@gmail.com>
Tue, 16 Aug 2011 22:19:03 +0000 (00:19 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 30 Aug 2011 08:53:39 +0000 (10:53 +0200)
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
fdisk/fdisk.c

index a08a4d413aa8efbb04a847ed583710e3ea0d9529..d3fc200103719dc47baf1b50aac7606a3ce4350f 100644 (file)
@@ -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