]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (sun) use self_label()
authorKarel Zak <kzak@redhat.com>
Thu, 5 Jan 2017 11:36:08 +0000 (12:36 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 5 Jan 2017 11:36:08 +0000 (12:36 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/sun.c

index 55ec8773caa923f64706f89517fa1e8b8fc5745b..d6a71b6e6f54e83fbe78569cf8e4d0ed7b4f3d90 100644 (file)
@@ -120,7 +120,7 @@ static int sun_probe_label(struct fdisk_context *cxt)
        assert(fdisk_is_label(cxt, SUN));
 
        /* map first sector to header */
-       sun = (struct fdisk_sun_label *) cxt->label;
+       sun = self_label(cxt);
        sun->header = (struct sun_disklabel *) cxt->firstsector;
        sunlabel = sun->header;
 
@@ -213,7 +213,7 @@ static int sun_create_disklabel(struct fdisk_context *cxt)
        if (rc)
                return rc;
 
-       sun = (struct fdisk_sun_label *) cxt->label;
+       sun = self_label(cxt);
        sun->header = (struct sun_disklabel *) cxt->firstsector;
 
        sunlabel = sun->header;