recipes/busybox: move opendreambox specific patches to better place
authorghost <andreas.monzner@multimedia-labs.de>
Tue, 23 Feb 2010 13:01:40 +0000 (14:01 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Mon, 1 Mar 2010 11:38:41 +0000 (12:38 +0100)
recipes/busybox/busybox-1.15.3/opendreambox/dhcp-hostname.patch [new file with mode: 0644]
recipes/busybox/busybox-1.15.3/opendreambox/keymap_endianess.patch [new file with mode: 0644]
recipes/busybox/files/dhcp-hostname.patch [deleted file]
recipes/busybox/files/keymap_endianess.patch [deleted file]

diff --git a/recipes/busybox/busybox-1.15.3/opendreambox/dhcp-hostname.patch b/recipes/busybox/busybox-1.15.3/opendreambox/dhcp-hostname.patch
new file mode 100644 (file)
index 0000000..f16f3fd
--- /dev/null
@@ -0,0 +1,25 @@
+diff -Naur busybox-1.11.3/networking/udhcp/dhcpc.c busybox-1.11.3_dhcp-hostname/networking/udhcp/dhcpc.c
+--- busybox-1.11.3/networking/udhcp/dhcpc.c    2008-06-25 14:51:14.000000000 +0200
++++ busybox-1.11.3_dhcp-hostname/networking/udhcp/dhcpc.c      2008-12-05 11:41:36.000000000 +0100
+@@ -145,6 +145,7 @@
+       struct timeval tv;
+       struct dhcpMessage packet;
+       fd_set rfds;
++      char hostbuf[256];      /* SUSv2: hostnames are <= 255 bytes */
+ #if ENABLE_GETOPT_LONG
+       static const char udhcpc_longopts[] ALIGN1 =
+@@ -210,6 +211,13 @@
+       USE_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;)
+       client_config.interface = "eth0";
+       client_config.script = DEFAULT_SCRIPT;
++      if (gethostname (hostbuf, sizeof (hostbuf)) == 0) {
++              int len = strlen (hostbuf);
++              client_config.hostname = xmalloc (len + 2);
++              client_config.hostname[OPT_CODE] = DHCP_HOST_NAME;
++              client_config.hostname[OPT_LEN] = len;
++              strncpy(client_config.hostname + 2, hostbuf, len);
++      }
+       /* Parse command line */
+       /* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */
diff --git a/recipes/busybox/busybox-1.15.3/opendreambox/keymap_endianess.patch b/recipes/busybox/busybox-1.15.3/opendreambox/keymap_endianess.patch
new file mode 100644 (file)
index 0000000..af07734
--- /dev/null
@@ -0,0 +1,42 @@
+diff -Naur busybox-1.11.3/console-tools/dumpkmap.c busybox-1.11.3_keymap-endianess/console-tools/dumpkmap.c
+--- busybox-1.11.3/console-tools/dumpkmap.c    2008-06-25 14:51:18.000000000 +0200
++++ busybox-1.11.3_keymap-endianess/console-tools/dumpkmap.c   2008-12-05 11:36:21.000000000 +0100
+@@ -10,6 +10,7 @@
+ /* no options, no getopt */
+ #include "libbb.h"
++#include <endian.h>
+ /* From <linux/kd.h> */
+ struct kbentry {
+@@ -56,6 +57,9 @@
+                                               (char *)&ke.kb_table,
+                                               &ke.kb_value)
+                               ) {
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++                                      ke.kb_value = ((ke.kb_value&0xFF) << 8) | ((ke.kb_value&0xFF00) >> 8);
++#endif
+                                       write(STDOUT_FILENO, (void*)&ke.kb_value, 2);
+                               }
+                       }
+diff -Naur busybox-1.11.3/console-tools/loadkmap.c busybox-1.11.3_keymap-endianess/console-tools/loadkmap.c
+--- busybox-1.11.3/console-tools/loadkmap.c    2008-06-25 14:51:18.000000000 +0200
++++ busybox-1.11.3_keymap-endianess/console-tools/loadkmap.c   2008-12-05 11:36:53.000000000 +0100
+@@ -9,6 +9,7 @@
+  */
+ #include "libbb.h"
++#include <endian.h>
+ #define BINARY_KEYMAP_MAGIC "bkeymap"
+@@ -49,6 +50,9 @@
+                       for (j = 0; j < NR_KEYS; j++) {
+                               ke.kb_index = j;
+                               ke.kb_table = i;
++#if __BYTE_ORDER == __LITTLE_ENDIAN
++                              ibuff[j] = ((ibuff[j]&0xFF) << 8) | ((ibuff[j]&0xFF00) >> 8);
++#endif
+                               ke.kb_value = ibuff[j];
+                               ioctl(fd, KDSKBENT, &ke);
+                       }
diff --git a/recipes/busybox/files/dhcp-hostname.patch b/recipes/busybox/files/dhcp-hostname.patch
deleted file mode 100644 (file)
index f16f3fd..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Naur busybox-1.11.3/networking/udhcp/dhcpc.c busybox-1.11.3_dhcp-hostname/networking/udhcp/dhcpc.c
---- busybox-1.11.3/networking/udhcp/dhcpc.c    2008-06-25 14:51:14.000000000 +0200
-+++ busybox-1.11.3_dhcp-hostname/networking/udhcp/dhcpc.c      2008-12-05 11:41:36.000000000 +0100
-@@ -145,6 +145,7 @@
-       struct timeval tv;
-       struct dhcpMessage packet;
-       fd_set rfds;
-+      char hostbuf[256];      /* SUSv2: hostnames are <= 255 bytes */
- #if ENABLE_GETOPT_LONG
-       static const char udhcpc_longopts[] ALIGN1 =
-@@ -210,6 +211,13 @@
-       USE_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;)
-       client_config.interface = "eth0";
-       client_config.script = DEFAULT_SCRIPT;
-+      if (gethostname (hostbuf, sizeof (hostbuf)) == 0) {
-+              int len = strlen (hostbuf);
-+              client_config.hostname = xmalloc (len + 2);
-+              client_config.hostname[OPT_CODE] = DHCP_HOST_NAME;
-+              client_config.hostname[OPT_LEN] = len;
-+              strncpy(client_config.hostname + 2, hostbuf, len);
-+      }
-       /* Parse command line */
-       /* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */
diff --git a/recipes/busybox/files/keymap_endianess.patch b/recipes/busybox/files/keymap_endianess.patch
deleted file mode 100644 (file)
index af07734..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -Naur busybox-1.11.3/console-tools/dumpkmap.c busybox-1.11.3_keymap-endianess/console-tools/dumpkmap.c
---- busybox-1.11.3/console-tools/dumpkmap.c    2008-06-25 14:51:18.000000000 +0200
-+++ busybox-1.11.3_keymap-endianess/console-tools/dumpkmap.c   2008-12-05 11:36:21.000000000 +0100
-@@ -10,6 +10,7 @@
- /* no options, no getopt */
- #include "libbb.h"
-+#include <endian.h>
- /* From <linux/kd.h> */
- struct kbentry {
-@@ -56,6 +57,9 @@
-                                               (char *)&ke.kb_table,
-                                               &ke.kb_value)
-                               ) {
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+                                      ke.kb_value = ((ke.kb_value&0xFF) << 8) | ((ke.kb_value&0xFF00) >> 8);
-+#endif
-                                       write(STDOUT_FILENO, (void*)&ke.kb_value, 2);
-                               }
-                       }
-diff -Naur busybox-1.11.3/console-tools/loadkmap.c busybox-1.11.3_keymap-endianess/console-tools/loadkmap.c
---- busybox-1.11.3/console-tools/loadkmap.c    2008-06-25 14:51:18.000000000 +0200
-+++ busybox-1.11.3_keymap-endianess/console-tools/loadkmap.c   2008-12-05 11:36:53.000000000 +0100
-@@ -9,6 +9,7 @@
-  */
- #include "libbb.h"
-+#include <endian.h>
- #define BINARY_KEYMAP_MAGIC "bkeymap"
-@@ -49,6 +50,9 @@
-                       for (j = 0; j < NR_KEYS; j++) {
-                               ke.kb_index = j;
-                               ke.kb_table = i;
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
-+                              ibuff[j] = ((ibuff[j]&0xFF) << 8) | ((ibuff[j]&0xFF00) >> 8);
-+#endif
-                               ke.kb_value = ibuff[j];
-                               ioctl(fd, KDSKBENT, &ke);
-                       }