[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r4341 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2010-06-12 01:10:39 +0000 (Sat, 12 Jun 2010)
New Revision: 4341

Added:
   glibc-package/trunk/debian/patches/hurd-i386/local-mkdir_root.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * Add patches/hurd-i386/local-mkdir_root.diff to fix busybox' mkdir -p.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2010-06-08 21:20:31 UTC (rev 4340)
+++ glibc-package/trunk/debian/changelog	2010-06-12 01:10:39 UTC (rev 4341)
@@ -1,3 +1,10 @@
+eglibc (2.11.1-4) unreleased; urgency=low
+
+  [ Samuel Thibault ]
+  * Add patches/hurd-i386/local-mkdir_root.diff to fix busybox' mkdir -p.
+
+ -- Samuel Thibault <sthibault@debian.org>  Sat, 12 Jun 2010 02:58:02 +0200
+
 eglibc (2.11.1-3) unstable; urgency=low
 
   [ Samuel Thibault ]

Added: glibc-package/trunk/debian/patches/hurd-i386/local-mkdir_root.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/local-mkdir_root.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/local-mkdir_root.diff	2010-06-12 01:10:39 UTC (rev 4341)
@@ -0,0 +1,55 @@
+Fix mkdir / error value (needed for busybox's mkdir -p)
+
+In the / case, directory_name_split can't really split that into an
+absolute ROOT file_t and ".", since name is supposed to be a pointer in
+file_name... Changing the interface is being proposed.
+
+---
+ mkdir.c   |    6 +++++-
+ mkdirat.c |    6 +++++-
+ 2 files changed, 10 insertions(+), 2 deletions(-)
+
+--- eglibc/sysdeps/mach/hurd/mkdir.c.orig	2010-06-12 00:48:27.000000000 +0000
++++ eglibc/sysdeps/mach/hurd/mkdir.c	2010-06-12 00:55:00.000000000 +0000
+@@ -20,6 +20,7 @@
+ #include <stddef.h>
+ #include <sys/stat.h>
+ #include <hurd.h>
++#include <string.h>
+ 
+ /* Create a directory named FILE_NAME with protections MODE.  */
+ int
+@@ -29,7 +30,10 @@
+ {
+   error_t err;
+   const char *name;
+-  file_t parent = __directory_name_split (file_name, (char **) &name);
++  file_t parent;
++  if (!strcmp(file_name, "/"))
++    return EEXIST;
++  parent = __directory_name_split (file_name, (char **) &name);
+   if (parent == MACH_PORT_NULL)
+     return -1;
+   err = __dir_mkdir (parent, name, mode & ~_hurd_umask);
+--- eglibc/sysdeps/mach/hurd/mkdirat.c.orig	2010-06-12 00:49:02.000000000 +0000
++++ eglibc/sysdeps/mach/hurd/mkdirat.c	2010-06-12 00:54:45.000000000 +0000
+@@ -23,6 +23,7 @@
+ #include <sys/stat.h>
+ #include <hurd.h>
+ #include <hurd/fd.h>
++#include <string.h>
+ 
+ int
+ mkdirat (fd, path, mode)
+@@ -32,7 +33,10 @@
+ {
+   error_t err;
+   const char *name;
+-  file_t parent = __directory_name_split_at (fd, path, (char **) &name);
++  file_t parent;
++  if (!strcmp(path, "/"))
++    return EEXIST;
++  parent = __directory_name_split_at (fd, path, (char **) &name);
+   if (parent == MACH_PORT_NULL)
+     return -1;
+   err = __dir_mkdir (parent, name, mode & ~_hurd_umask);

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2010-06-08 21:20:31 UTC (rev 4340)
+++ glibc-package/trunk/debian/patches/series	2010-06-12 01:10:39 UTC (rev 4341)
@@ -125,6 +125,7 @@
 hurd-i386/cvs-linkat.diff
 hurd-i386/submitted-ttyname.diff
 hurd-i386/submitted-getnprocs.diff
+hurd-i386/local-mkdir_root.diff
 
 ia64/local-dlfptr.diff
 ia64/submitted-sysconf.diff


Reply to: