|
|
|
[PATCH 1/2] fdisk: don't call update_units() in label probes if not necessary | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
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@xxxxxxx>
---
fdisks/fdiskaixlabel.c | 1 -
fdisks/fdiskmaclabel.c | 1 -
fdisks/fdisksgilabel.c | 1 -
3 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/fdisks/fdiskaixlabel.c b/fdisks/fdiskaixlabel.c
index 474a177..f908abc 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 1b82660..cbdf592 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 32dae78..c0b346a 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;
--
1.7.7
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Netdev] [Ethernet Bridging] [Linux Wireless] [Kernel Newbies] [Memory] [Security] [Linux for Hams] [Netfilter] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [Linux RAID] [Linux Admin] [Samba] [Video 4 Linux] [Linux Resources]