Hi, The attached patch means that parted does not error with "invalid token" if you specify a PART-TYPE of primary when we have already confirmed this feature via a call to ped_disk_type_check_feature.
This brings parted inline with its own documentation and fixes (what appears
to be) a regression from a previous version.
Signed-off-by: Chris Lamb <[EMAIL PROTECTED]>
---
parted/parted.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
Regards,
--
Chris Lamb, UK [EMAIL PROTECTED]
GPG: 0x634F9A20
From c992bcb55cb1daf6cd294340e9b1072ea85d24e7 Mon Sep 17 00:00:00 2001
From: Chris Lamb <[EMAIL PROTECTED]>
Date: Mon, 23 Jun 2008 00:29:46 +0100
Subject: [PATCH] Ignore "primary" on mkpart command line if we've already detected it.
This means that parted does not error with "invalid token" if you specify
a PART-TYPE of primary when we have already confirmed this feature via
a call to ped_disk_type_check_feature.
This brings parted inline with its own documentation and fixes (what
appears to be) a regression from a previous version.
Signed-off-by: Chris Lamb <[EMAIL PROTECTED]>
---
parted/parted.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/parted/parted.c b/parted/parted.c
index 28357f4..99285c1 100644
--- a/parted/parted.c
+++ b/parted/parted.c
@@ -702,6 +702,14 @@ do_mkpart (PedDevice** dev)
if (!ped_disk_type_check_feature (disk->type, PED_DISK_TYPE_EXTENDED)) {
part_type = PED_PARTITION_NORMAL;
+
+ peek_word = command_line_peek_word ();
+ if (peek_word) {
+ if (strncmp (peek_word, "primary", 7) == 0) {
+ command_line_pop_word();
+ }
+ free (peek_word);
+ }
} else {
if (!command_line_get_part_type (_("Partition type?"),
disk, &part_type))
--
1.5.5.4
signature.asc
Description: PGP signature
_______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

