]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
rm: ignore errno related to invalid file names
authorNadav Har'El <nyh@math.technion.ac.il>
Tue, 11 Jan 2011 14:53:07 +0000 (07:53 -0700)
committerEric Blake <eblake@redhat.com>
Tue, 11 Jan 2011 18:48:53 +0000 (11:48 -0700)
* src/remove.c (nonexistent_file_errno): Also skip EINVAL and
EILSEQ, for at least smbfs rejection of '*' in file names.
* NEWS: Mention the fix.

NEWS
src/remove.c

diff --git a/NEWS b/NEWS
index 5a70243b213c70c8e43e9bb5a11c77d645214b78..9ccad63a3f38f6b096b0d36b1fe891360c04ff42 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,9 @@ GNU coreutils NEWS                                    -*- outline -*-
   argument following the one containing the moved sub-tree.
   [bug introduced in coreutils-5.1.0]
 
+  rm -f no longer fails for EINVAL or EILSEQ on file systems that
+  reject file names invalid for that file system.
+
 
 * Noteworthy changes in release 8.9 (2011-01-04) [stable]
 
index f7b00c62e3ce3d5229732ff0b788c561f7f9b335..38142323895fb01bb8405eae3bf09712c005d7db 100644 (file)
@@ -378,10 +378,18 @@ nonexistent_file_errno (int errnum)
      exist, but be (in)accessible only via too long a symlink chain.
      Likewise for ENAMETOOLONG, since rm -f ./././.../foo may fail
      if the "..." part expands to a long enough sequence of "./"s,
-     even though ./foo does indeed exist.  */
+     even though ./foo does indeed exist.
+
+     Another case to consider is when a particular name is invalid for
+     a given file system.  In 2011, smbfs returns EINVAL, but the next
+     revision of POSIX will require EILSEQ for that situation:
+     http://austingroupbugs.net/view.php?id=293
+  */
 
   switch (errnum)
     {
+    case EILSEQ:
+    case EINVAL:
     case ENOENT:
     case ENOTDIR:
       return true;