From 6aaeca3fe0c46e79f9949d443061c7103ccf1652 Mon Sep 17 00:00:00 2001 From: Petr Uzel Date: Thu, 12 Jul 2012 11:47:18 +0200 Subject: [PATCH] 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 --- fdisks/fdiskaixlabel.c | 1 - fdisks/fdiskmaclabel.c | 1 - fdisks/fdisksgilabel.c | 1 - 3 files changed, 3 deletions(-) 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; -- 2.47.2