summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/file/file/ge-le.patch
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2013-11-27 17:24:43 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-29 09:52:56 +0000
commit2e62e82e18e5f96cd9c6b76e453a016149d96ff1 (patch)
tree5d29084279a754d19f98f13eeed12a78f9d69d73 /meta/recipes-devtools/file/file/ge-le.patch
parent5bfd3779fd16ed530b4c36d730dbf968d4770ba0 (diff)
downloadpoky-2e62e82e18e5f96cd9c6b76e453a016149d96ff1.tar.gz
file: remove useless patches
no user uses these two patches (From OE-Core rev: 47e7b47def5b06a1d825bf0883409510cb4da36f) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/file/file/ge-le.patch')
-rw-r--r--meta/recipes-devtools/file/file/ge-le.patch72
1 files changed, 0 insertions, 72 deletions
diff --git a/meta/recipes-devtools/file/file/ge-le.patch b/meta/recipes-devtools/file/file/ge-le.patch
deleted file mode 100644
index fb7d671d6c..0000000000
--- a/meta/recipes-devtools/file/file/ge-le.patch
+++ /dev/null
@@ -1,72 +0,0 @@
1Upstream-Status: Pending
2
3`>=' and `<=' was silently ignored in previous version,
4but causes an warning in file 5.04. Add support for these
5two operators as a feature extension, however, users should
6not rely on them.
7
88/17/2010 - created by Qing He <qing.he@intel.com>
9
10diff --git a/src/apprentice.c b/src/apprentice.c
11index 3d4c3cf..a2b86ed 100644
12--- a/src/apprentice.c
13+++ b/src/apprentice.c
14@@ -1396,11 +1396,10 @@ parse(struct magic_set *ms, struct magic_entry **mentryp, uint32_t *nmentryp,
15 m->reln = *l;
16 ++l;
17 if (*l == '=') {
18- if (ms->flags & MAGIC_CHECK) {
19- file_magwarn(ms, "%c= not supported",
20- m->reln);
21- return -1;
22- }
23+ if (m->reln == '>')
24+ m->reln = 'g';
25+ else if (m->reln == '<')
26+ m->reln = 'l';
27 ++l;
28 }
29 break;
30diff --git a/src/softmagic.c b/src/softmagic.c
31index d8a5675..1648e43 100644
32--- a/src/softmagic.c
33+++ b/src/softmagic.c
34@@ -1955,6 +1955,38 @@ magiccheck(struct magic_set *ms, struct magic *m)
35 }
36 break;
37
38+ case 'g':
39+ if (m->flag & UNSIGNED) {
40+ matched = v >= l;
41+ if ((ms->flags & MAGIC_DEBUG) != 0)
42+ (void) fprintf(stderr, "%llu >= %llu = %d\n",
43+ (unsigned long long)v,
44+ (unsigned long long)l, matched);
45+ }
46+ else {
47+ matched = (int64_t) v >= (int64_t) l;
48+ if ((ms->flags & MAGIC_DEBUG) != 0)
49+ (void) fprintf(stderr, "%lld >= %lld = %d\n",
50+ (long long)v, (long long)l, matched);
51+ }
52+ break;
53+
54+ case 'l':
55+ if (m->flag & UNSIGNED) {
56+ matched = v <= l;
57+ if ((ms->flags & MAGIC_DEBUG) != 0)
58+ (void) fprintf(stderr, "%llu <= %llu = %d\n",
59+ (unsigned long long)v,
60+ (unsigned long long)l, matched);
61+ }
62+ else {
63+ matched = (int64_t) v <= (int64_t) l;
64+ if ((ms->flags & MAGIC_DEBUG) != 0)
65+ (void) fprintf(stderr, "%lld <= %lld = %d\n",
66+ (long long)v, (long long)l, matched);
67+ }
68+ break;
69+
70 case '&':
71 matched = (v & l) == l;
72 if ((ms->flags & MAGIC_DEBUG) != 0)