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:31:44 +0000 |
commit | 9a4ab3b1ad45a556b845530a12ec865be2278c78 (patch) | |
tree | b52995222684153eae81e9b7fee53bf885fcb713 /meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch | |
parent | 87376746d64aea47cce327d951692c31d4acf872 (diff) | |
download | openembedded-core-contrib-9a4ab3b1ad45a556b845530a12ec865be2278c78.tar.gz |
mtd-utils: Backport and create patches to support musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
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 @@ +Replace rpmatch() usage with checking first character of line + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/include/common.h ++++ b/include/common.h +@@ -122,10 +122,12 @@ + } + + if (strcmp("\n", line) != 0) { +- switch (rpmatch(line)) { +- case 0: ret = false; break; +- case 1: ret = true; break; +- case -1: ++ switch (line[0]) { ++ case 'N': ++ case 'n': ret = false; break; ++ case 'Y': ++ case 'y': ret = true; break; ++ default: + puts("unknown response; please try again"); + continue; + } |