summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-11-18 23:24:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-12 23:42:55 +0000
commit36a709aa0f232a1887cf60f2eaf0a44fdd707ecd (patch)
tree7924315a890369f1ebacf4adee744273fc490c05 /meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
parent41fd73fe6591ee4d4e905d228db19d29f7c04637 (diff)
downloadpoky-36a709aa0f232a1887cf60f2eaf0a44fdd707ecd.tar.gz
mtd-utils: Backport and create patches to support musl
(From OE-Core rev: 9a4ab3b1ad45a556b845530a12ec865be2278c78) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch')
-rw-r--r--meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
new file mode 100644
index 0000000000..7d783e7a5c
--- /dev/null
+++ b/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
@@ -0,0 +1,24 @@
1Replace rpmatch() usage with checking first character of line
2
3Upstream-Status: Pending
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5
6--- a/include/common.h
7+++ b/include/common.h
8@@ -122,10 +122,12 @@
9 }
10
11 if (strcmp("\n", line) != 0) {
12- switch (rpmatch(line)) {
13- case 0: ret = false; break;
14- case 1: ret = true; break;
15- case -1:
16+ switch (line[0]) {
17+ case 'N':
18+ case 'n': ret = false; break;
19+ case 'Y':
20+ case 'y': ret = true; break;
21+ default:
22 puts("unknown response; please try again");
23 continue;
24 }