aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/mtd-utils/patches/010-fix-rpmatch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/mtd-utils/patches/010-fix-rpmatch.patch')
-rw-r--r--package/utils/mtd-utils/patches/010-fix-rpmatch.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/package/utils/mtd-utils/patches/010-fix-rpmatch.patch b/package/utils/mtd-utils/patches/010-fix-rpmatch.patch
new file mode 100644
index 0000000000..9d0de7f521
--- /dev/null
+++ b/package/utils/mtd-utils/patches/010-fix-rpmatch.patch
@@ -0,0 +1,19 @@
+--- a/include/common.h
++++ b/include/common.h
+@@ -137,10 +137,12 @@ static inline bool prompt(const char *ms
+ }
+
+ 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;
+ }