summaryrefslogtreecommitdiff
path: root/packages/busybox
diff options
context:
space:
mode:
authorMichael-Luke Jones <mlj28@cam.ac.uk>2006-09-24 08:30:45 +0000
committerMichael-Luke Jones <mlj28@cam.ac.uk>2006-09-24 08:30:45 +0000
commitb063040bc4416c347fb179df5fa71402cd6011d0 (patch)
tree525200d1114e10823ef7dfc3e59bded3835c7116 /packages/busybox
parenta56c24ff15fdd6f51cc2cd606c459b76388162c7 (diff)
busybox: drop in an mdev patch from busybox.net
slugos-init: add in module loading logic for NSLU2 * Maintainers with other ixp4xx devices should follow suit
Diffstat (limited to 'packages/busybox')
-rw-r--r--packages/busybox/busybox-1.2.1/mdevdelnodes.patch39
-rw-r--r--packages/busybox/busybox_1.2.1.bb3
2 files changed, 41 insertions, 1 deletions
diff --git a/packages/busybox/busybox-1.2.1/mdevdelnodes.patch b/packages/busybox/busybox-1.2.1/mdevdelnodes.patch
new file mode 100644
index 0000000000..b63a703a89
--- /dev/null
+++ b/packages/busybox/busybox-1.2.1/mdevdelnodes.patch
@@ -0,0 +1,39 @@
+Patch from Chris Steel to fix mdev deleting device nodes.
+
+--- busybox/util-linux/mdev.c 2006/08/03 15:41:12 15767
++++ busybox/util-linux/mdev.c 2006/08/10 01:09:37 15795
+@@ -37,18 +37,19 @@
+ * because sscanf() will stop at the first nondigit, which \n is. We
+ * also depend on path having writeable space after it. */
+
+- strcat(path, "/dev");
+- fd = open(path, O_RDONLY);
+- len = read(fd, temp + 1, 64);
+- *temp++ = 0;
+- close(fd);
+- if (len < 1) return;
++ if (!delete) {
++ strcat(path, "/dev");
++ fd = open(path, O_RDONLY);
++ len = read(fd, temp + 1, 64);
++ *temp++ = 0;
++ close(fd);
++ if (len < 1) return;
++ }
+
+ /* Determine device name, type, major and minor */
+
+ device_name = strrchr(path, '/') + 1;
+ type = path[5]=='c' ? S_IFCHR : S_IFBLK;
+- if (sscanf(temp, "%d:%d", &major, &minor) != 2) return;
+
+ /* If we have a config file, look up permissions for this device */
+
+@@ -164,6 +165,7 @@
+
+ umask(0);
+ if (!delete) {
++ if (sscanf(temp, "%d:%d", &major, &minor) != 2) return;
+ if (mknod(device_name, mode | type, makedev(major, minor)) && errno != EEXIST)
+ bb_perror_msg_and_die("mknod %s failed", device_name);
+
diff --git a/packages/busybox/busybox_1.2.1.bb b/packages/busybox/busybox_1.2.1.bb
index 8e1204ef78..2c3d5c4cb7 100644
--- a/packages/busybox/busybox_1.2.1.bb
+++ b/packages/busybox/busybox_1.2.1.bb
@@ -10,13 +10,14 @@ HOMEPAGE = "http://www.busybox.net"
LICENSE = "GPL"
SECTION = "base"
PRIORITY = "required"
-PR = "r1.5"
+PR = "r1.6"
SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
file://dhcp-hostname.patch;patch=1 \
file://ifupdown-spurious-environ.patch;patch=1 \
file://udhcpscript.patch;patch=1 \
file://wget-long-options.patch;patch=1 \
+ file://mdevdelnodes.patch;patch=1 \
file://defconfig \
file://busybox-cron \
file://busybox-httpd \