aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch
blob: 7d783e7a5c88cbeaabb01bebe04c0f3570de6ce5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Replace rpmatch() usage with checking first character of line

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

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