summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
diff options
context:
space:
mode:
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 }