summaryrefslogtreecommitdiff
path: root/packages/hdparm
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-03-07 02:48:30 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-03-07 02:48:30 +0000
commit82f522e25a15d4a3bb992e25cf2d72524e00aee3 (patch)
tree6df1d9b7cf94cb5192ea66fb8eceaecf43058280 /packages/hdparm
parent95ab40dfc8bbb89f1579b5b5e2167459c97fcf8f (diff)
parenta4f387cd021a1609192a230ac88147bdd9cd7011 (diff)
merge of '8641efcbdf45be9e288119393a9b475e46f9c515'
and 'b0f962e1665b2f7f0c836386fa0e1e6e3bf6c376'
Diffstat (limited to 'packages/hdparm')
-rw-r--r--packages/hdparm/hdparm-6.9/.mtn2git_empty0
-rw-r--r--packages/hdparm/hdparm-6.9/bswap.patch39
-rw-r--r--packages/hdparm/hdparm-6.9/uclibc.patch35
-rw-r--r--packages/hdparm/hdparm_6.9.bb14
4 files changed, 88 insertions, 0 deletions
diff --git a/packages/hdparm/hdparm-6.9/.mtn2git_empty b/packages/hdparm/hdparm-6.9/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/hdparm/hdparm-6.9/.mtn2git_empty
diff --git a/packages/hdparm/hdparm-6.9/bswap.patch b/packages/hdparm/hdparm-6.9/bswap.patch
new file mode 100644
index 0000000000..3281c33954
--- /dev/null
+++ b/packages/hdparm/hdparm-6.9/bswap.patch
@@ -0,0 +1,39 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+Index: hdparm-6.9/hdparm.c
+===================================================================
+--- hdparm-6.9.orig/hdparm.c 2006-10-25 16:41:33.000000000 +0200
++++ hdparm-6.9/hdparm.c 2007-03-05 14:02:03.000000000 +0100
+@@ -19,8 +19,9 @@
+ #include <linux/types.h>
+ #include <linux/hdreg.h>
+ #include <linux/major.h>
+-#include <asm/byteorder.h>
+-//#include <endian.h>
++#include <byteswap.h>
++
++#define le16_to_cpus(x) bswap_16(htons(x))
+
+ #include "hdparm.h"
+
+@@ -1328,7 +1329,7 @@
+ }
+ } else {
+ for(i = 0; i < 0x100; ++i) {
+- __le16_to_cpus(&id[i]);
++ le16_to_cpus(&id[i]);
+ }
+ identify((void *)id);
+ }
+@@ -1608,7 +1609,7 @@
+ && ishex(d[++digit] = getchar())
+ && ishex(d[++digit] = getchar())) {
+ sbuf[wc] = (fromhex(d[0]) << 12) | (fromhex(d[1]) << 8) | (fromhex(d[2]) << 4) | fromhex(d[3]);
+- __le16_to_cpus((__u16 *)(&sbuf[wc]));
++ le16_to_cpus((__u16 *)(&sbuf[wc]));
+ ++wc;
+ } else if (d[digit] == EOF) {
+ goto eof;
diff --git a/packages/hdparm/hdparm-6.9/uclibc.patch b/packages/hdparm/hdparm-6.9/uclibc.patch
new file mode 100644
index 0000000000..0758aa07b8
--- /dev/null
+++ b/packages/hdparm/hdparm-6.9/uclibc.patch
@@ -0,0 +1,35 @@
+Index: hdparm-6.9/hdparm.c
+===================================================================
+--- hdparm-6.9.orig/hdparm.c 2007-03-05 14:02:03.000000000 +0100
++++ hdparm-6.9/hdparm.c 2007-03-05 14:02:23.000000000 +0100
+@@ -16,7 +16,9 @@
+ #include <sys/times.h>
+ #include <sys/types.h>
+ #include <sys/mount.h>
++#ifndef __UCLIBC__
+ #include <linux/types.h>
++#endif
+ #include <linux/hdreg.h>
+ #include <linux/major.h>
+ #include <byteswap.h>
+Index: hdparm-6.9/hdparm.h
+===================================================================
+--- hdparm-6.9.orig/hdparm.h 2006-04-28 16:33:01.000000000 +0200
++++ hdparm-6.9/hdparm.h 2007-03-05 14:03:10.000000000 +0100
+@@ -1,6 +1,6 @@
+ /* Some prototypes for extern functions. */
+
+-#include <linux/types.h> /* for __u16 */
++#include <stdint.h>
+
+ #if !defined(__GNUC__) && !defined(__attribute__)
+ #define __attribute__(x) /* if not using GCC, turn off the __attribute__
+@@ -11,7 +11,7 @@
+ others, though, were declared in hdparm.c with global scope; since other
+ functions in that file have static (file) scope, I assume the difference is
+ intentional. */
+-extern void identify (__u16 *id_supplied);
++extern void identify (uint16_t *id_supplied);
+
+ extern void usage_error(int out) __attribute__((noreturn));
+ extern int main(int argc, char **argv) __attribute__((noreturn));
diff --git a/packages/hdparm/hdparm_6.9.bb b/packages/hdparm/hdparm_6.9.bb
new file mode 100644
index 0000000000..94d1e6e9bf
--- /dev/null
+++ b/packages/hdparm/hdparm_6.9.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "hdparm is a Linux shell utility for viewing \
+and manipulating various IDE drive and driver parameters."
+SECTION = "console/utils"
+PRIORITY = "optional"
+LICENSE = "BSD"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/hdparm/hdparm-${PV}.tar.gz \
+ file://bswap.patch;patch=1 \
+ file://uclibc.patch;patch=1"
+
+do_install () {
+ install -d ${D}/${sbindir} ${D}/${mandir}/man8
+ oe_runmake 'DESTDIR=${D}' install
+}