]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: fix menu
authorDavidlohr Bueso <dave@gnu.org>
Thu, 26 Jul 2012 14:16:57 +0000 (16:16 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 26 Jul 2012 15:25:41 +0000 (17:25 +0200)
Commit 79c8a145ddff98d9c5bc70e67c5a861f67c50484 changed the numerical values of
fdisk_labeltype and broke the menu functionality, mixing main and expert menus.
Revert this change along with the label comment regarding it matching labeltype.

This is no longer valid since the original patch that lead to this modification
assumed that __probe_labels() would use these indices when creating a default
DOS/SUN disklabel, see http://www.spinics.net/lists/util-linux-ng/msg06509.html

Reported-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisks/fdisk.h
fdisks/utils.c

index 04c25e296641467c8084c44107dc481db4bd86b0..05dc8a8e0a13d2c4de28dd6e68a17cdc4a179e34 100644 (file)
@@ -228,13 +228,13 @@ extern sector_t get_nr_sects(struct partition *p);
  * Supported partition table types (labels)
  */
 enum fdisk_labeltype {
-       ANY_LABEL = -1,
        DOS_LABEL = 1,
-       SUN_LABEL,
-       SGI_LABEL,
-       AIX_LABEL,
-       OSF_LABEL,
-       MAC_LABEL,
+       SUN_LABEL = 2,
+       SGI_LABEL = 4,
+       AIX_LABEL = 8,
+       OSF_LABEL = 16,
+       MAC_LABEL = 32,
+       ANY_LABEL = -1
 };
 
 extern enum fdisk_labeltype disklabel;
index 19aed8776157b36c5d999eeb30d4839d152c7d99..84cdd4d98f8bf3995cbeb1ec1d7ad42c403eabe9 100644 (file)
@@ -36,8 +36,6 @@ int fdisk_debug_mask;
 
 /*
  * Label probing functions.
- * Must have the same order as fdisk_labeltype as the index
- * depends on it.
  */
 static const struct fdisk_label *labels[] =
 {