]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fdisk: set label pointer in fdisk_create_default_disklabel()
authorKarel Zak <kzak@redhat.com>
Mon, 23 Jul 2012 15:58:53 +0000 (17:58 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Jul 2012 15:58:53 +0000 (17:58 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisks/utils.c

index ffb0c25fbc7cc33ae3ed564a4eb04c34eac3d04b..64abae6df0719aa18af0efcca9bc3d016602efe3 100644 (file)
@@ -303,9 +303,14 @@ int fdisk_create_default_disklabel(struct fdisk_context *cxt)
 {
        if (!cxt)
                return -EINVAL;
+
+       /* TODO: use fdisk_create_disklabel() */
 #ifdef __sparc__
+       cxt->label = &sun_label;
        return create_sunlabel(cxt);
+
 #else
+       cxt->label = &dos_label;
        return create_doslabel(cxt);
 #endif
 }