diff options
author | Khem Raj <raj.khem@gmail.com> | 2015-11-18 23:24:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-12 23:42:55 +0000 |
commit | 36a709aa0f232a1887cf60f2eaf0a44fdd707ecd (patch) | |
tree | 7924315a890369f1ebacf4adee744273fc490c05 /meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch | |
parent | 41fd73fe6591ee4d4e905d228db19d29f7c04637 (diff) | |
download | poky-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.patch | 24 |
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 @@ | |||
1 | Replace rpmatch() usage with checking first character of line | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | Signed-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 | } | ||