summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/hdparm/hdparm-6.3
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-extended/hdparm/hdparm-6.3
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/hdparm/hdparm-6.3')
-rw-r--r--meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch36
-rw-r--r--meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch32
2 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch b/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
new file mode 100644
index 0000000000..37fbcb7b38
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm-6.3/bswap.patch
@@ -0,0 +1,36 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- hdparm-5.8/hdparm.c~bswap
7+++ hdparm-5.8/hdparm.c
8@@ -20,7 +20,9 @@
9 #include <linux/types.h>
10 #include <linux/hdreg.h>
11 #include <linux/major.h>
12-#include <asm/byteorder.h>
13+#include <byteswap.h>
14+
15+#define le16_to_cpus(x) bswap_16(htons(x))
16
17 #include "hdparm.h"
18
19@@ -1160,7 +1162,7 @@
20 }
21 } else {
22 for(i = 0; i < 0x100; ++i) {
23- __le16_to_cpus(&id[i]);
24+ le16_to_cpus(&id[i]);
25 }
26 identify((void *)id, NULL);
27 }
28@@ -1380,7 +1382,7 @@
29 }
30 for (i = 0; count >= 4; ++i) {
31 sbuf[i] = (fromhex(b[0]) << 12) | (fromhex(b[1]) << 8) | (fromhex(b[2]) << 4) | fromhex(b[3]);
32- __le16_to_cpus((__u16 *)(&sbuf[i]));
33+ le16_to_cpus((__u16 *)(&sbuf[i]));
34 b += 5;
35 count -= 5;
36 }
diff --git a/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch b/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
new file mode 100644
index 0000000000..495d7491bb
--- /dev/null
+++ b/meta/recipes-extended/hdparm/hdparm-6.3/uclibc.patch
@@ -0,0 +1,32 @@
1--- hdparm-5.8/hdparm.c.ark 2005-05-22 19:48:34.000000000 +0000
2+++ hdparm-5.8/hdparm.c 2005-05-22 19:52:18.000000000 +0000
3@@ -17,7 +17,9 @@
4 #include <sys/times.h>
5 #include <sys/types.h>
6 #include <sys/mount.h>
7+#ifndef __UCLIBC__
8 #include <linux/types.h>
9+#endif
10 #include <linux/hdreg.h>
11 #include <linux/major.h>
12 #include <byteswap.h>
13--- hdparm-5.8/hdparm.h.ark 2005-05-22 19:51:49.000000000 +0000
14+++ hdparm-5.8/hdparm.h 2005-05-22 19:54:54.000000000 +0000
15@@ -1,6 +1,6 @@
16 /* Some prototypes for extern functions. */
17
18-#include <linux/types.h> /* for __u16 */
19+#include <stdint.h>
20
21 #if !defined(__GNUC__) && !defined(__attribute__)
22 #define __attribute__(x) /* if not using GCC, turn off the __attribute__
23@@ -11,7 +11,7 @@
24 others, though, were declared in hdparm.c with global scope; since other
25 functions in that file have static (file) scope, I assume the difference is
26 intentional. */
27-extern void identify (__u16 *id_supplied, const char *devname);
28+extern void identify (uint16_t *id_supplied, const char *devname);
29
30 extern void usage_error(int out) __attribute__((noreturn));
31 extern int main(int argc, char **argv) __attribute__((noreturn));
32