]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (sun) remove duplicate code
authorKarel Zak <kzak@redhat.com>
Wed, 29 May 2013 13:08:12 +0000 (15:08 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Sep 2013 14:46:57 +0000 (16:46 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/sun.c

index baab28b7c6aadccb7201863e2bb17a91902842ac..a8d200fb285e211a777630648b7a01ef3e5b067a 100644 (file)
@@ -132,10 +132,6 @@ static int sun_probe_label(struct fdisk_context *cxt)
                return 1;
        }
 
-       /* map first sector buffer to sun header */
-       sun = (struct fdisk_sun_label *) cxt->label;
-       sun->header = (struct sun_disklabel *) cxt->firstsector;
-
        cxt->label->nparts_max = SUN_MAXPARTITIONS;
        cxt->geom.heads = be16_to_cpu(sunlabel->nhead);
        cxt->geom.cylinders = be16_to_cpu(sunlabel->ncyl);
@@ -216,7 +212,6 @@ static int sun_create_disklabel(struct fdisk_context *cxt)
        sunlabel = sun->header;
 
        cxt->label->nparts_max = SUN_MAXPARTITIONS;
-       fdisk_zeroize_firstsector(cxt);
 
        sunlabel->magic = cpu_to_be16(SUN_LABEL_MAGIC);
        sunlabel->vtoc.version = cpu_to_be32(SUN_VTOC_VERSION);