From: Petr Uzel Date: Thu, 12 Jul 2012 09:47:18 +0000 (+0200) Subject: fdisk: don't call update_units() in label probes if not necessary X-Git-Tag: v2.22-rc1~146 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6aaeca3fe0c46e79f9949d443061c7103ccf1652;p=thirdparty%2Futil-linux.git 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 --- diff --git a/fdisks/fdiskaixlabel.c b/fdisks/fdiskaixlabel.c index 474a177493..f908abcb89 100644 --- a/fdisks/fdiskaixlabel.c +++ b/fdisks/fdiskaixlabel.c @@ -57,7 +57,6 @@ static int check_aix_label(struct fdisk_context *cxt) return 0; } other_endian = (aixlabel->magic == AIX_LABEL_MAGIC_SWAPPED); - update_units(cxt); disklabel = AIX_LABEL; partitions= 1016; volumes = 15; diff --git a/fdisks/fdiskmaclabel.c b/fdisks/fdiskmaclabel.c index 1b826609d4..cbdf5926f8 100644 --- a/fdisks/fdiskmaclabel.c +++ b/fdisks/fdiskmaclabel.c @@ -72,7 +72,6 @@ check_mac_label(struct fdisk_context *cxt) IS_MAC: other_endian = (maclabel->magic == MAC_LABEL_MAGIC_SWAPPED); // =? - update_units(cxt); disklabel = MAC_LABEL; partitions= 1016; // =? volumes = 15; // =? diff --git a/fdisks/fdisksgilabel.c b/fdisks/fdisksgilabel.c index 32dae78b0c..c0b346ac0b 100644 --- a/fdisks/fdisksgilabel.c +++ b/fdisks/fdisksgilabel.c @@ -151,7 +151,6 @@ check_sgi_label(struct fdisk_context *cxt) { fprintf(stderr, _("Detected sgi disklabel with wrong checksum.\n")); } - update_units(cxt); disklabel = SGI_LABEL; partitions= 16; volumes = 15;