From 87dcaf2094baf9a7b7993c2ff1f60db73f4248f4 Mon Sep 17 00:00:00 2001 From: Andre McCurdy Date: Thu, 6 Apr 2017 15:43:53 -0700 Subject: mtd-utils: refresh patches now merged upstream Update Upstream-Status tags and apply 010-fix-rpmatch.patch unconditionally, since it's merged unconditionally upstream. Signed-off-by: Andre McCurdy Signed-off-by: Richard Purdie --- .../mtd/mtd-utils/010-fix-rpmatch.patch | 45 ++++++++++++++++++++-- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch') diff --git a/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch b/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch index 7d783e7a5c..853de6af98 100644 --- a/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch +++ b/meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch @@ -1,11 +1,48 @@ -Replace rpmatch() usage with checking first character of line +From 82839c3c0371ca2a1643a99d7d01f5bc1c850b28 Mon Sep 17 00:00:00 2001 +From: David Oberhollenzer +Date: Thu, 2 Mar 2017 11:40:36 +0100 +Subject: [PATCH] Replace rpmatch() usage with checking first character of line + +This is based on the patch from Khem Raj used by openembedded. In +addition to the original patch, this also removes the fallback +implementation that was provided for C libraries that don't implement +rpmatch. + +Upstream-Status: Backport -Upstream-Status: Pending Signed-off-by: Khem Raj +Signed-off-by: David Oberhollenzer +--- + include/common.h | 25 ++++++------------------- + 1 file changed, 6 insertions(+), 19 deletions(-) +diff --git a/include/common.h b/include/common.h +index d0c706d..d609257 100644 --- a/include/common.h +++ b/include/common.h -@@ -122,10 +122,12 @@ +@@ -129,21 +129,6 @@ extern "C" { + fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \ + } while(0) + +-/* uClibc versions before 0.9.34 and musl don't have rpmatch() */ +-#if defined(__UCLIBC__) && \ +- (__UCLIBC_MAJOR__ == 0 && \ +- (__UCLIBC_MINOR__ < 9 || \ +- (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34))) || \ +- !defined(__GLIBC__) +-#undef rpmatch +-#define rpmatch __rpmatch +-static inline int __rpmatch(const char *resp) +-{ +- return (resp[0] == 'y' || resp[0] == 'Y') ? 1 : +- (resp[0] == 'n' || resp[0] == 'N') ? 0 : -1; +-} +-#endif +- + /** + * prompt the user for confirmation + */ +@@ -164,10 +149,12 @@ static inline bool prompt(const char *msg, bool def) } if (strcmp("\n", line) != 0) { @@ -22,3 +59,5 @@ Signed-off-by: Khem Raj puts("unknown response; please try again"); continue; } +-- +2.6.1 -- cgit 1.2.3-korg