diff options
author | Andre McCurdy <armccurdy@gmail.com> | 2017-04-06 15:43:53 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-04-11 18:10:18 +0100 |
commit | 31a293d0dc3c6cd6515ded5c00bd2089c3e1826c (patch) | |
tree | 9ccf83eaa8cdbb2905c8a45caac9fb38f2c43c21 /meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch | |
parent | 3df7ee4755653f3783a9eaa81b019abf6be7a29a (diff) | |
download | poky-31a293d0dc3c6cd6515ded5c00bd2089c3e1826c.tar.gz |
mtd-utils: refresh patches now merged upstream
Update Upstream-Status tags and apply 010-fix-rpmatch.patch
unconditionally, since it's merged unconditionally upstream.
(From OE-Core rev: 87dcaf2094baf9a7b7993c2ff1f60db73f4248f4)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch')
-rw-r--r-- | meta/recipes-devtools/mtd/mtd-utils/010-fix-rpmatch.patch | 45 |
1 files changed, 42 insertions, 3 deletions
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 @@ | |||
1 | Replace rpmatch() usage with checking first character of line | 1 | From 82839c3c0371ca2a1643a99d7d01f5bc1c850b28 Mon Sep 17 00:00:00 2001 |
2 | From: David Oberhollenzer <david.oberhollenzer@sigma-star.at> | ||
3 | Date: Thu, 2 Mar 2017 11:40:36 +0100 | ||
4 | Subject: [PATCH] Replace rpmatch() usage with checking first character of line | ||
5 | |||
6 | This is based on the patch from Khem Raj used by openembedded. In | ||
7 | addition to the original patch, this also removes the fallback | ||
8 | implementation that was provided for C libraries that don't implement | ||
9 | rpmatch. | ||
10 | |||
11 | Upstream-Status: Backport | ||
2 | 12 | ||
3 | Upstream-Status: Pending | ||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
14 | Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> | ||
15 | --- | ||
16 | include/common.h | 25 ++++++------------------- | ||
17 | 1 file changed, 6 insertions(+), 19 deletions(-) | ||
5 | 18 | ||
19 | diff --git a/include/common.h b/include/common.h | ||
20 | index d0c706d..d609257 100644 | ||
6 | --- a/include/common.h | 21 | --- a/include/common.h |
7 | +++ b/include/common.h | 22 | +++ b/include/common.h |
8 | @@ -122,10 +122,12 @@ | 23 | @@ -129,21 +129,6 @@ extern "C" { |
24 | fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \ | ||
25 | } while(0) | ||
26 | |||
27 | -/* uClibc versions before 0.9.34 and musl don't have rpmatch() */ | ||
28 | -#if defined(__UCLIBC__) && \ | ||
29 | - (__UCLIBC_MAJOR__ == 0 && \ | ||
30 | - (__UCLIBC_MINOR__ < 9 || \ | ||
31 | - (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34))) || \ | ||
32 | - !defined(__GLIBC__) | ||
33 | -#undef rpmatch | ||
34 | -#define rpmatch __rpmatch | ||
35 | -static inline int __rpmatch(const char *resp) | ||
36 | -{ | ||
37 | - return (resp[0] == 'y' || resp[0] == 'Y') ? 1 : | ||
38 | - (resp[0] == 'n' || resp[0] == 'N') ? 0 : -1; | ||
39 | -} | ||
40 | -#endif | ||
41 | - | ||
42 | /** | ||
43 | * prompt the user for confirmation | ||
44 | */ | ||
45 | @@ -164,10 +149,12 @@ static inline bool prompt(const char *msg, bool def) | ||
9 | } | 46 | } |
10 | 47 | ||
11 | if (strcmp("\n", line) != 0) { | 48 | if (strcmp("\n", line) != 0) { |
@@ -22,3 +59,5 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
22 | puts("unknown response; please try again"); | 59 | puts("unknown response; please try again"); |
23 | continue; | 60 | continue; |
24 | } | 61 | } |
62 | -- | ||
63 | 2.6.1 | ||