diff options
Diffstat (limited to 'yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch')
-rw-r--r-- | yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch new file mode 100644 index 000000000..7d783e7a5 --- /dev/null +++ b/yocto-poky/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch @@ -0,0 +1,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; + } |