summaryrefslogtreecommitdiffstats
path: root/meta/packages/hdparm
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
committerRichard Purdie <richard@openedhand.com>2006-07-21 10:10:31 +0000
commitb2f192faabe412adce79534e22efe9fb69ee40e2 (patch)
tree7076c49d4286f8a1733650bd8fbc7161af200d57 /meta/packages/hdparm
parent2cf0eadf9f730027833af802d7e6c90b44248f80 (diff)
downloadpoky-b2f192faabe412adce79534e22efe9fb69ee40e2.tar.gz
Rename /openembedded/ -> /meta/
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@530 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages/hdparm')
-rw-r--r--meta/packages/hdparm/hdparm-6.3/bswap.patch36
-rw-r--r--meta/packages/hdparm/hdparm-6.3/uclibc.patch32
-rw-r--r--meta/packages/hdparm/hdparm_6.3.bb14
3 files changed, 82 insertions, 0 deletions
diff --git a/meta/packages/hdparm/hdparm-6.3/bswap.patch b/meta/packages/hdparm/hdparm-6.3/bswap.patch
new file mode 100644
index 0000000000..37fbcb7b38
--- /dev/null
+++ b/meta/packages/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/packages/hdparm/hdparm-6.3/uclibc.patch b/meta/packages/hdparm/hdparm-6.3/uclibc.patch
new file mode 100644
index 0000000000..495d7491bb
--- /dev/null
+++ b/meta/packages/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
diff --git a/meta/packages/hdparm/hdparm_6.3.bb b/meta/packages/hdparm/hdparm_6.3.bb
new file mode 100644
index 0000000000..94d1e6e9bf
--- /dev/null
+++ b/meta/packages/hdparm/hdparm_6.3.bb
@@ -0,0 +1,14 @@
1DESCRIPTION = "hdparm is a Linux shell utility for viewing \
2and manipulating various IDE drive and driver parameters."
3SECTION = "console/utils"
4PRIORITY = "optional"
5LICENSE = "BSD"
6
7SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz \
8 file://bswap.patch;patch=1 \
9 file://uclibc.patch;patch=1"
10
11do_install () {
12 install -d ${D}/${sbindir} ${D}/${mandir}/man8
13 oe_runmake 'DESTDIR=${D}' install
14}