|
|
277929 |
From 911bc52b2609ccb2cc3b123ce383b07c66d54048 Mon Sep 17 00:00:00 2001
|
|
|
277929 |
From: Phillip Susi <psusi@ubuntu.com>
|
|
|
277929 |
Date: Mon, 4 Nov 2013 13:10:09 -0500
|
|
|
277929 |
Subject: [PATCH] libparted: make sure not to treat percentages as exact
|
|
|
277929 |
(#1045957)
|
|
|
277929 |
|
|
|
277929 |
If 1% of the drive size worked out ot be an even power of
|
|
|
277929 |
two, it would trigger the exact placement. Add an exception
|
|
|
277929 |
for the percent units.
|
|
|
277929 |
---
|
|
|
277929 |
NEWS | 9 +++++++++
|
|
|
277929 |
libparted/unit.c | 2 +-
|
|
|
277929 |
2 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
277929 |
|
|
|
277929 |
diff --git a/NEWS b/NEWS
|
|
|
277929 |
index e2d01ed..80a62d6 100644
|
|
|
277929 |
--- a/NEWS
|
|
|
277929 |
+++ b/NEWS
|
|
|
277929 |
@@ -1,5 +1,13 @@
|
|
|
277929 |
GNU parted NEWS -*- outline -*-
|
|
|
277929 |
|
|
|
277929 |
+* Noteworthy changes in release 3.1-16 (2014-01-22) [RHEL7]
|
|
|
277929 |
+
|
|
|
277929 |
+** Bug Fixes
|
|
|
277929 |
+
|
|
|
277929 |
+ If a drive was 100 times an even multiple of two, sizes specified as
|
|
|
277929 |
+ a percentage would trigger the exact placement rule and refuse to round
|
|
|
277929 |
+ to the nearest half percent.
|
|
|
277929 |
+
|
|
|
277929 |
* Noteworthy changes in release 3.1-4 (2012-06-08) [Fedora]
|
|
|
277929 |
|
|
|
277929 |
** Bug Fixes
|
|
|
277929 |
@@ -8,6 +16,7 @@ GNU parted NEWS -*- outline -*-
|
|
|
277929 |
libparted: Treat disks without a PMBR as msdos labeled disks
|
|
|
277929 |
even if they have GPT partition tables.
|
|
|
277929 |
|
|
|
277929 |
+
|
|
|
277929 |
* Noteworthy changes in release 3.1 (2012-03-02) [stable]
|
|
|
277929 |
|
|
|
277929 |
** New features
|
|
|
277929 |
diff --git a/libparted/unit.c b/libparted/unit.c
|
|
|
277929 |
index 66f2b6c..265cc68 100644
|
|
|
277929 |
--- a/libparted/unit.c
|
|
|
277929 |
+++ b/libparted/unit.c
|
|
|
277929 |
@@ -548,7 +548,7 @@ ped_unit_parse_custom (const char* str, const PedDevice* dev, PedUnit unit,
|
|
|
277929 |
do not use 4MiB as the range. Rather, presume that they
|
|
|
277929 |
are specifying precisely the starting or ending number,
|
|
|
277929 |
and treat "4MiB" just as we would treat "4194304B". */
|
|
|
277929 |
- if (is_power_of_2 (unit_size))
|
|
|
277929 |
+ if (is_power_of_2 (unit_size) && unit != PED_UNIT_PERCENT)
|
|
|
277929 |
radius = 0;
|
|
|
277929 |
|
|
|
277929 |
*sector = num * unit_size / dev->sector_size;
|
|
|
277929 |
--
|
|
|
277929 |
1.8.4.2
|
|
|
277929 |
|