]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: de-duplicate disk label strings
authorBernhard Voelker <mail@bernhard-voelker.de>
Tue, 24 Jul 2012 11:18:16 +0000 (13:18 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 24 Jul 2012 12:10:57 +0000 (14:10 +0200)
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
fdisks/fdisk.c

index 244f0e7c48afc0a27b55620ceeeee90c24b0c993..143263b94043cc35d5435a9371c7fd6676296241 100644 (file)
@@ -1528,7 +1528,7 @@ expert_command_prompt(struct fdisk_context *cxt)
                                fix_partition_table_order();
                        break;
                case 'g':
-                       fdisk_create_disklabel(cxt, "sgi");
+                       fdisk_create_disklabel(cxt, sgi_label.name);
                        break;
                case 'h':
                        user_heads = cxt->geom.heads = read_int(cxt, 1, cxt->geom.heads, 256, 0,
@@ -1754,7 +1754,7 @@ static void command_prompt(struct fdisk_context *cxt)
                        new_partition(cxt);
                        break;
                case 'o':
-                       fdisk_create_disklabel(cxt, "dos");
+                       fdisk_create_disklabel(cxt, dos_label.name);
                        break;
                case 'p':
                        list_table(cxt, 0);
@@ -1762,7 +1762,7 @@ static void command_prompt(struct fdisk_context *cxt)
                case 'q':
                        handle_quit(cxt);
                case 's':
-                       fdisk_create_disklabel(cxt, "sun");
+                       fdisk_create_disklabel(cxt, sun_label.name);
                        break;
                case 't':
                        change_sysid(cxt);