]> code.ossystems Code Review - openembedded-core.git/commitdiff
busybox: Fix redirection of fd 0 in ash interactive
authorJoshua Lock <josh@linux.intel.com>
Thu, 3 Jun 2010 08:57:28 +0000 (09:57 +0100)
committerJoshua Lock <josh@linux.intel.com>
Fri, 4 Jun 2010 19:02:01 +0000 (20:02 +0100)
Backported change from the 1.16.1 ash patches.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
meta/packages/busybox/busybox-1.15.3/ash_fix_redirection_of_fd_0.patch [new file with mode: 0644]
meta/packages/busybox/busybox_1.15.3.bb

diff --git a/meta/packages/busybox/busybox-1.15.3/ash_fix_redirection_of_fd_0.patch b/meta/packages/busybox/busybox-1.15.3/ash_fix_redirection_of_fd_0.patch
new file mode 100644 (file)
index 0000000..5c79127
--- /dev/null
@@ -0,0 +1,21 @@
+Fix redirection of fd 0 in scripts sourced from interactive ash
+
+Based on Busybox git 08d8b3cee1329d390f91bce419e2b4dadf484952 by
+Denys Vlasenko <vda.linux@googlemail.com>.
+
+Can be removed when we bump to 1.16.1 + patches or later
+
+JL 03/06/10
+Index: busybox-1.15.3/shell/ash.c
+===================================================================
+--- busybox-1.15.3.orig/shell/ash.c    2009-12-12 21:16:38.000000000 +0000
++++ busybox-1.15.3/shell/ash.c 2010-06-03 09:44:59.484647637 +0100
+@@ -5071,7 +5071,7 @@
+               return 0;
+       pf = g_parsefile;
+       while (pf) {
+-              if (fd == pf->fd) {
++              if (pf->fd > 0 && fd == pf->fd) {
+                       return 1;
+               }
+               pf = pf->prev;
index 4e465825ce4a4f5dfc6d6498ced0bf3364ff9ee0..c0b5872e274120be4124bb8d8b8e6aeddad55cad 100644 (file)
@@ -1,15 +1,16 @@
 require busybox.inc
-PR = "2"
+PR = "3"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
-  file://udhcpscript.patch;patch=1 \
-  file://udhcpc-fix-nfsroot.patch;patch=1 \
-  file://B921600.patch;patch=1 \
-  file://get_header_tar.patch;patch=1 \
-  file://busybox-appletlib-dependency.patch;patch=1 \
-  file://0000-wget-no-check-certificate.patch;patch=1 \
-  file://run-parts.in.usr-bin.patch;patch=1 \
+  file://udhcpscript.patch \
+  file://udhcpc-fix-nfsroot.patch \
+  file://B921600.patch \
+  file://get_header_tar.patch \
+  file://busybox-appletlib-dependency.patch \
+  file://0000-wget-no-check-certificate.patch \
+  file://run-parts.in.usr-bin.patch \
+  file://ash_fix_redirection_of_fd_0.patch \
   file://find-touchscreen.sh \
   file://busybox-cron \
   file://busybox-httpd \
@@ -24,4 +25,4 @@ SRC_URI = "\
   file://defconfig \
 "
 
-EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
\ No newline at end of file
+EXTRA_OEMAKE += "V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"