From: Francesco Cosoleto <cosoleto@gmail.com>
To: util-linux@vger.kernel.org
Cc: Francesco Cosoleto <cosoleto@gmail.com>
Subject: [PATCH 2/5] fdisk: print partition deleted message
Date: Wed, 17 Aug 2011 00:19:03 +0200 [thread overview]
Message-ID: <1313533146-2806-2-git-send-email-cosoleto@gmail.com> (raw)
In-Reply-To: <1313533146-2806-1-git-send-email-cosoleto@gmail.com>
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
---
fdisk/fdisk.c | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index a08a4d4..d3fc200 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
--
1.7.3.4
next prev parent reply other threads:[~2011-08-16 22:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-16 22:19 [PATCH 1/5] fdisk: print a message with size and type of created partition Francesco Cosoleto
2011-08-16 22:19 ` Francesco Cosoleto [this message]
2011-08-16 22:19 ` [PATCH 3/5] fdisk: print welcome message Francesco Cosoleto
2011-08-16 22:19 ` [PATCH 4/5] tests: add ts_fdisk_clean function to make fdisk output comparable Francesco Cosoleto
2011-08-16 22:19 ` [PATCH 5/5] tests: update fdisk and blkid MD tests Francesco Cosoleto
2011-08-17 11:21 ` [PATCH] fdisk: print a message with size and type of created partition Francesco Cosoleto
2011-08-30 9:00 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313533146-2806-2-git-send-email-cosoleto@gmail.com \
--to=cosoleto@gmail.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox