1
0
This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
svn-openwrt-archive/package/utils/ubi-utils/patches/010-fix-rpmatch.patch
Hauke Mehrtens 4ab1830682 ubi-utils: fix build with gcc5
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 46610
2015-08-16 20:16:43 +00:00

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