diff options
author | Paul Barker <paul@paulbarker.me.uk> | 2016-06-05 12:58:04 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-06-08 14:55:29 +0200 |
commit | f90b8d367d9bc8ffb02a70fbc23451a020653511 (patch) | |
tree | ba8528efa0ed72956fbec8fce38165a2abc3b009 /meta-oe/recipes-core/toybox/toybox/0002-Fix-trimmed-printf-in-grep.patch | |
parent | 3ff2e225b7125f5c65d482e7c65f43bdfd37c850 (diff) | |
download | meta-openembedded-contrib-f90b8d367d9bc8ffb02a70fbc23451a020653511.tar.gz |
toybox: Upgrade to 0.7.1
The previous patches are now included in the upstream 0.7.1 release. Two new
patches are needed, both of which have been submitted upstream:
* The version should report as 0.7.1 not 0.7.0.
* grep didn't print any output due to printf choking on a field width
of INT_MAX/2. When trim is not set we can drop the field width
instead of using a huge default width.
The unstripped toybox binary has moved from "toybox_unstripped" to
"generated/unstripped/toybox".
Additionally, the swapon command is now disabled as it does not support the '-a'
option used by initscripts.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-core/toybox/toybox/0002-Fix-trimmed-printf-in-grep.patch')
-rw-r--r-- | meta-oe/recipes-core/toybox/toybox/0002-Fix-trimmed-printf-in-grep.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/toybox/toybox/0002-Fix-trimmed-printf-in-grep.patch b/meta-oe/recipes-core/toybox/toybox/0002-Fix-trimmed-printf-in-grep.patch new file mode 100644 index 0000000000..37808d03bc --- /dev/null +++ b/meta-oe/recipes-core/toybox/toybox/0002-Fix-trimmed-printf-in-grep.patch @@ -0,0 +1,34 @@ +From 9c51a0d7690fb3b08871dae2486af4032d8442fb Mon Sep 17 00:00:00 2001 +From: Paul Barker <paul@paulbarker.me.uk> +Date: Sat, 4 Jun 2016 15:42:48 +0100 +Subject: [PATCH 2/2] Fix trimmed printf in grep + +Using a default trim value of INT_MAX/2 when printing a line causes nothing to +be printed on a system built using OpenEmbedded for the qemux86 target. This may +also affect other systems. + +Signed-off-by: Paul Barker <paul@paulbarker.me.uk> +Upstream-status: Submitted +--- + toys/posix/grep.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/toys/posix/grep.c b/toys/posix/grep.c +index 2ca02d2..f38c538 100644 +--- a/toys/posix/grep.c ++++ b/toys/posix/grep.c +@@ -74,7 +74,10 @@ static void outline(char *line, char dash, char *name, long lcount, long bcount, + if (!line || (lcount && (toys.optflags&FLAG_n))) + printf("%ld%c", lcount, line ? dash : TT.outdelim); + if (bcount && (toys.optflags&FLAG_b)) printf("%ld%c", bcount-1, dash); +- if (line) xprintf("%.*s%c", trim ? trim : INT_MAX/2, line, TT.outdelim); ++ if (line) { ++ if (trim) xprintf("%.*s%c", trim, line, TT.outdelim); ++ else xprintf("%s%c", line, TT.outdelim); ++ } + } + + // Show matches in one file +-- +2.1.4 + |