* [PATCH] libparted: make sure not to treat percentages as exact
@ 2014-03-12 9:46 Zhu Yanjun
2014-03-12 13:14 ` Richard Purdie
0 siblings, 1 reply; 3+ messages in thread
From: Zhu Yanjun @ 2014-03-12 9:46 UTC (permalink / raw)
To: openembedded-core
---
...ke-sure-not-to-treat-percentages-as-exact.patch | 22 ++++++++++++++++++++
meta/recipes-extended/parted/parted_3.1.bb | 3 ++-
2 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/parted/parted-3.1/parted-libparted-make-sure-not-to-treat-percentages-as-exact.patch
diff --git a/meta/recipes-extended/parted/parted-3.1/parted-libparted-make-sure-not-to-treat-percentages-as-exact.patch b/meta/recipes-extended/parted/parted-3.1/parted-libparted-make-sure-not-to-treat-percentages-as-exact.patch
new file mode 100644
index 0000000..1cf8309
--- /dev/null
+++ b/meta/recipes-extended/parted/parted-3.1/parted-libparted-make-sure-not-to-treat-percentages-as-exact.patch
@@ -0,0 +1,22 @@
+libparted: make sure not to treat percentages as exact
+
+If 1% of the drive size worked out ot be an even power of
+two, it would trigger the exact placement. Add an exception
+for the percent units.
+---
+ libparted/unit.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libparted/unit.c b/libparted/unit.c
+index e545985..ff479f1 100644
+--- a/libparted/unit.c
++++ b/libparted/unit.c
+@@ -548,7 +548,7 @@ ped_unit_parse_custom (const char* str, const PedDevice* dev, PedUnit unit,
+ do not use 4MiB as the range. Rather, presume that they
+ are specifying precisely the starting or ending number,
+ and treat "4MiB" just as we would treat "4194304B". */
+- if (is_power_of_2 (unit_size))
++ if (is_power_of_2 (unit_size) && unit != PED_UNIT_PERCENT)
+ radius = 0;
+
+ *sector = num * unit_size / dev->sector_size;
diff --git a/meta/recipes-extended/parted/parted_3.1.bb b/meta/recipes-extended/parted/parted_3.1.bb
index 8344ea8..d791275 100644
--- a/meta/recipes-extended/parted/parted_3.1.bb
+++ b/meta/recipes-extended/parted/parted_3.1.bb
@@ -4,7 +4,7 @@ LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=2f31b266d3440dd7ee50f92cf67d8e6c"
SECTION = "console/tools"
DEPENDS = "ncurses readline util-linux"
-PR = "r1"
+PR = "r2"
SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
file://no_check.patch \
@@ -15,6 +15,7 @@ SRC_URI = "${GNU_MIRROR}/parted/parted-${PV}.tar.xz \
file://fix-deprecated-readline.patch \
file://run-ptest \
file://Makefile \
+ file://parted-libparted-make-sure-not-to-treat-percentages-as-exact.patch \
"
SRC_URI[md5sum] = "5d89d64d94bcfefa9ce8f59f4b81bdcb"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] libparted: make sure not to treat percentages as exact
2014-03-12 9:46 [PATCH] libparted: make sure not to treat percentages as exact Zhu Yanjun
@ 2014-03-12 13:14 ` Richard Purdie
2014-03-13 1:53 ` Otavio Salvador
0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2014-03-12 13:14 UTC (permalink / raw)
To: Zhu Yanjun; +Cc: openembedded-core
On Wed, 2014-03-12 at 17:46 +0800, Zhu Yanjun wrote:
> ---
> ...ke-sure-not-to-treat-percentages-as-exact.patch | 22 ++++++++++++++++++++
> meta/recipes-extended/parted/parted_3.1.bb | 3 ++-
> 2 files changed, 24 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-extended/parted/parted-3.1/parted-libparted-make-sure-not-to-treat-percentages-as-exact.patch
There is no long log in the commit message (why is this patch
important?) and no Upstream-Status in the patch.
Cheers,
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] libparted: make sure not to treat percentages as exact
2014-03-12 13:14 ` Richard Purdie
@ 2014-03-13 1:53 ` Otavio Salvador
0 siblings, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2014-03-13 1:53 UTC (permalink / raw)
To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer
On Wed, Mar 12, 2014 at 10:14 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Wed, 2014-03-12 at 17:46 +0800, Zhu Yanjun wrote:
>> ---
>> ...ke-sure-not-to-treat-percentages-as-exact.patch | 22 ++++++++++++++++++++
>> meta/recipes-extended/parted/parted_3.1.bb | 3 ++-
>> 2 files changed, 24 insertions(+), 1 deletion(-)
>> create mode 100644 meta/recipes-extended/parted/parted-3.1/parted-libparted-make-sure-not-to-treat-percentages-as-exact.patch
>
> There is no long log in the commit message (why is this patch
> important?) and no Upstream-Status in the patch.
Please send the patch to the upstream mailing list. I can help with
the handling there if needed (I was quite involved in GNU Parted
development, in past).
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-13 1:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12 9:46 [PATCH] libparted: make sure not to treat percentages as exact Zhu Yanjun
2014-03-12 13:14 ` Richard Purdie
2014-03-13 1:53 ` Otavio Salvador
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.