packages/utils/mtd-utils/patches/010-fix-rpmatch.patch
luka f7ac493e12 [packages] mtd-utils: upgrade to latest git version
Signed-off-by: Luka Perkov <luka@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@38300 3c298f89-4303-0410-b956-a3cf2f4a3e73
2013-10-04 03:15:02 +00:00

20 lines
415 B
Diff

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