fdisk: don't call update_units() in label probes if not necessary

update_units() is called in _probe_labels before the label probes are
started, so we don't need to call it again in probers, unless it messes
around with geometry, which currently only check_sun_label() does (so
keep the call to update_units() in this one).

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
This commit is contained in:
Petr Uzel 2012-07-12 11:47:18 +02:00 committed by Karel Zak
parent b6ab57b1ab
commit 6aaeca3fe0
3 changed files with 0 additions and 3 deletions

View file

@ -57,7 +57,6 @@ static int check_aix_label(struct fdisk_context *cxt)
return 0; return 0;
} }
other_endian = (aixlabel->magic == AIX_LABEL_MAGIC_SWAPPED); other_endian = (aixlabel->magic == AIX_LABEL_MAGIC_SWAPPED);
update_units(cxt);
disklabel = AIX_LABEL; disklabel = AIX_LABEL;
partitions= 1016; partitions= 1016;
volumes = 15; volumes = 15;

View file

@ -72,7 +72,6 @@ check_mac_label(struct fdisk_context *cxt)
IS_MAC: IS_MAC:
other_endian = (maclabel->magic == MAC_LABEL_MAGIC_SWAPPED); // =? other_endian = (maclabel->magic == MAC_LABEL_MAGIC_SWAPPED); // =?
update_units(cxt);
disklabel = MAC_LABEL; disklabel = MAC_LABEL;
partitions= 1016; // =? partitions= 1016; // =?
volumes = 15; // =? volumes = 15; // =?

View file

@ -151,7 +151,6 @@ check_sgi_label(struct fdisk_context *cxt) {
fprintf(stderr, fprintf(stderr,
_("Detected sgi disklabel with wrong checksum.\n")); _("Detected sgi disklabel with wrong checksum.\n"));
} }
update_units(cxt);
disklabel = SGI_LABEL; disklabel = SGI_LABEL;
partitions= 16; partitions= 16;
volumes = 15; volumes = 15;