8374a26e9bbb83b35ef3750721eb031d6ea17084
[openwrt/openwrt.git] / package / utils / mtd-utils / patches / 010-fix-rpmatch.patch
1 --- a/include/common.h
2 +++ b/include/common.h
3 @@ -152,10 +152,12 @@ static inline bool prompt(const char *ms
4 }
5
6 if (strcmp("\n", line) != 0) {
7 - switch (rpmatch(line)) {
8 - case 0: ret = false; break;
9 - case 1: ret = true; break;
10 - case -1:
11 + switch (line[0]) {
12 + case 'N':
13 + case 'n': ret = false; break;
14 + case 'Y':
15 + case 'y': ret = true; break;
16 + default:
17 puts("unknown response; please try again");
18 continue;
19 }