Busybox errstr on create
authorBarret Rhoden <brho@cs.berkeley.edu>
Mon, 20 Jan 2014 00:24:04 +0000 (16:24 -0800)
committerBarret Rhoden <brho@cs.berkeley.edu>
Mon, 20 Jan 2014 00:24:04 +0000 (16:24 -0800)
They have a different error path in ash for creations, so we had to
patch it.  I like this one a bit more than the bb_error crap, since I
can choose between errno strings and errstr.

To apply, cd into your bb directory and patch -p1.

tools/patches/busybox-create-errstr.patch [new file with mode: 0644]

diff --git a/tools/patches/busybox-create-errstr.patch b/tools/patches/busybox-create-errstr.patch
new file mode 100644 (file)
index 0000000..6cbc182
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/shell/ash.c      2014-01-19 16:10:06.228270755 -0800
++++ b/shell/ash.c      2014-01-19 16:12:46.388266769 -0800
+@@ -1151,7 +1151,9 @@
+       if (e == ENOENT || e == ENOTDIR) {
+               return em;
+       }
+-      return strerror(e);
++      if (errstr()[0] == 0)
++              return strerror(e);
++      return errstr();
+ }