OSDN Git Service

dvh.c (dvh_partition_set_name): Include partition name in diagnostic.
authorJim Meyering <meyering@redhat.com>
Sat, 2 Feb 2008 16:00:42 +0000 (17:00 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 4 Feb 2008 07:22:19 +0000 (08:22 +0100)
libparted/labels/dvh.c
parted/parted.c

index 9497ad5..3e377ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
     libparted - a library for manipulating disk partitions
-    Copyright (C) 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
+    Copyright (C) 2001, 2002, 2005, 2007-2008 Free Software Foundation, Inc.
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -717,7 +717,9 @@ dvh_partition_set_name (PedPartition* part, const char* name)
                ped_exception_throw (
                        PED_EXCEPTION_ERROR,
                        PED_EXCEPTION_CANCEL,
-                       _("Only logical partitions (boot files) have a name."));
+                       _("failed to set dvh partition name to %s:\n"
+                          "Only logical partitions (boot files) have a name."),
+                        name);
 #endif
        }
 }
index f7f6dc3..46999f5 100644 (file)
@@ -708,9 +708,9 @@ do_mkpart (PedDevice** dev)
                         goto error_destroy_disk;
         }
 
-#if 1
-        /* This undocumented _feature_, is next to useless, at least with
-           a dvh partition table, since it makes the "mkpart" command
+        /* The undocumented feature that mkpart sometimes takes a
+           partition name is next to useless, at least with a dvh
+           partition table, since it makes the "mkpart" command
            fail unconditionally for a primary partition.  E.g.,
            mkpart primary any-name xfs 4096s 5000s
            requires the name, yet always fails, saying that only
@@ -723,7 +723,6 @@ do_mkpart (PedDevice** dev)
                   && part_type != PED_PARTITION_LOGICAL))
                 part_name = command_line_get_word (_("Partition name?"),
                                                    "", NULL, 1);
-#endif
 
         peek_word = command_line_peek_word ();
         if (part_type == PED_PARTITION_EXTENDED