diff options
author | Karel Zak | 2013-05-29 15:10:03 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:46:57 +0200 |
commit | f91d32ae92924f026a69b2221ebd5fccce6893a8 (patch) | |
tree | 6dfbba6cdfd95fce5126cceb5a41f2ef79b73504 /fdisks/fdisksgilabel.c | |
parent | libfdisk: (sun) remove duplicate code (diff) | |
download | kernel-qcow2-util-linux-f91d32ae92924f026a69b2221ebd5fccce6893a8.tar.gz kernel-qcow2-util-linux-f91d32ae92924f026a69b2221ebd5fccce6893a8.tar.xz kernel-qcow2-util-linux-f91d32ae92924f026a69b2221ebd5fccce6893a8.zip |
fdisk: (sgi) remove unnecessary code
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdisksgilabel.c')
-rw-r--r-- | fdisks/fdisksgilabel.c | 29 |
1 files changed, 3 insertions, 26 deletions
diff --git a/fdisks/fdisksgilabel.c b/fdisks/fdisksgilabel.c index 1e7feb965..9095bbc41 100644 --- a/fdisks/fdisksgilabel.c +++ b/fdisks/fdisksgilabel.c @@ -229,8 +229,10 @@ static int sgi_probe_label(struct fdisk_context *cxt) sgi->header = (struct sgi_disklabel *) cxt->firstsector; sgilabel = sgi->header; - if (be32_to_cpu(sgilabel->magic) != SGI_LABEL_MAGIC) + if (be32_to_cpu(sgilabel->magic) != SGI_LABEL_MAGIC) { + sgi->header = NULL; return 0; + } /* * test for correct checksum @@ -890,31 +892,6 @@ static int sgi_create_disklabel(struct fdisk_context *cxt) " > 33.8 GB."), cxt->dev_path, cxt->geom.cylinders); } #endif - /* - * Convert old MBR to SGI label, make it DEPRECATED, this feature - * has to be handled in by any top-level fdisk command. - * - for (i = 0; i < 4; i++) { - old[i].sysid = 0; - if (mbr_is_valid_magic(cxt->firstsector)) { - if (get_part_table(i)->sys_ind) { - old[i].sysid = get_part_table(i)->sys_ind; - old[i].start = get_start_sect(get_part_table(i)); - old[i].nsect = get_nr_sects(get_part_table(i)); - if (debug) - printf(_("ID=%02x\tSTART=%d\tLENGTH=%d\n"), - old[i].sysid, old[i].start, old[i].nsect); - } - } - } - - for (i = 0; i < 4; i++) - if (old[i].sysid) { - printf(_("Trying to keep parameters of partitions already set.\n")); - break; - } - */ - fdisk_zeroize_firstsector(cxt); sgi = (struct fdisk_sgi_label *) cxt->label; sgi->header = (struct sgi_disklabel *) cxt->firstsector; |