From 36a709aa0f232a1887cf60f2eaf0a44fdd707ecd Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Nov 2015 23:24:32 +0000 Subject: mtd-utils: Backport and create patches to support musl (From OE-Core rev: 9a4ab3b1ad45a556b845530a12ec865be2278c78) Signed-off-by: Khem Raj Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- .../mtd/mtd-utils/010-fix-rpmatch.patch | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch (limited to 'meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch') 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 + +--- 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; + } -- cgit v1.2.3-54-g00ecf