Signed-off-by: Karel Zak <kzak@redhat.com>
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;
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;