openwrtv4/package/utils/mtd-utils/patches/010-fix-rpmatch.patch
John Crispin 9352603fff mtd-utils: merge ubi/nand-utils into one package
Signed-off-by: John Crispin <john@phrozen.org>
2016-07-11 14:19:47 +02:00

19 lines
456 B
Diff

--- 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;
}