From: Francesco Cosoleto <cosoleto@gmail.com>
To: util-linux@vger.kernel.org
Cc: Francesco Cosoleto <cosoleto@gmail.com>
Subject: [PATCH 5/5] fdisk: enable expert menu with SGI label
Date: Fri, 11 Nov 2011 11:12:11 +0100 [thread overview]
Message-ID: <1321006331-7633-5-git-send-email-cosoleto@gmail.com> (raw)
In-Reply-To: <1321006331-7633-1-git-send-email-cosoleto@gmail.com>
This allows the creation of a new label if the disk already has an existing
SGI disklabel without working around this problem such as creating a DOS
disklabel or overwriting with zero the partition table (problem reported in
'Gentoo Linux/MIPS Handbook').
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
---
fdisk/fdisk.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 934d458..9ca3f2b 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -103,7 +103,7 @@ static const struct menulist_descr menulist[] = {
{'e', N_("list extended partitions"), {0, DOS_LABEL}},
{'e', N_("edit drive data"), {OSF_LABEL, 0}},
{'f', N_("fix partition order"), {0, DOS_LABEL}},
- {'g', N_("create an IRIX (SGI) partition table"), {0, DOS_LABEL | SGI_LABEL}},
+ {'g', N_("create an IRIX (SGI) partition table"), {0, ANY_LABEL}},
{'h', N_("change number of heads"), {0, DOS_LABEL | SUN_LABEL}},
{'i', N_("change interleave factor"), {0, SUN_LABEL}},
{'i', N_("change the disk identifier"), {0, DOS_LABEL}},
@@ -124,7 +124,7 @@ static const struct menulist_descr menulist[] = {
{'v', N_("verify the partition table"), {DOS_LABEL | SUN_LABEL | SGI_LABEL, DOS_LABEL | SUN_LABEL | SGI_LABEL}},
{'w', N_("write table to disk and exit"), {DOS_LABEL | SUN_LABEL | SGI_LABEL, DOS_LABEL | SUN_LABEL | SGI_LABEL}},
{'w', N_("write disklabel to disk"), {OSF_LABEL, 0}},
- {'x', N_("extra functionality (experts only)"), {DOS_LABEL | SUN_LABEL, 0}},
+ {'x', N_("extra functionality (experts only)"), {DOS_LABEL | SUN_LABEL | SGI_LABEL, 0}},
#if !defined (__alpha__)
{'x', N_("link BSD partition to non-BSD partition"), {OSF_LABEL, 0}},
#endif
@@ -2985,12 +2985,7 @@ static void command_prompt(void)
write_table(); /* does not return */
break;
case 'x':
- if (disklabel == SGI_LABEL) {
- fprintf(stderr,
- _("\n\tSorry, no experts menu for SGI "
- "partition tables available.\n\n"));
- } else
- expert_command_prompt();
+ expert_command_prompt();
break;
default:
unknown_command(c);
--
1.7.3.4
next prev parent reply other threads:[~2011-11-11 10:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 10:12 [PATCH 1/5] fdisk: print the welcome message when OSF/1 disklabel is detected Francesco Cosoleto
2011-11-11 10:12 ` [PATCH 2/5] fdisk: rename bselect, xselect functions Francesco Cosoleto
2011-11-11 10:12 ` [PATCH 3/5] fdisk: move command prompt code to a separate function Francesco Cosoleto
2011-11-11 10:12 ` [PATCH 4/5] fdisk: rewrite print menu system Francesco Cosoleto
2011-11-11 11:40 ` Karel Zak
2011-11-11 16:49 ` Francesco Cosoleto
2011-11-11 10:12 ` Francesco Cosoleto [this message]
2011-11-14 13:42 ` [PATCH 1/5] fdisk: print the welcome message when OSF/1 disklabel is detected Karel Zak
2011-11-14 16:03 ` Francesco Cosoleto
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=1321006331-7633-5-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;
as well as URLs for NNTP newsgroup(s).