grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.11-13-g40679f5


From: Jim Meyering
Subject: grep branch, master, updated. v2.11-13-g40679f5
Date: Sat, 14 Apr 2012 09:25:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  40679f5dbbb710bc3d09e0f410379fae20ba65e7 (commit)
       via  92449ffdc47f1e7dd01fbc110eb094977dafb66a (commit)
      from  b00d1eee17148143c5a9187e6d4b68569a02cf24 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=40679f5dbbb710bc3d09e0f410379fae20ba65e7


commit 40679f5dbbb710bc3d09e0f410379fae20ba65e7
Author: Jim Meyering <address@hidden>
Date:   Thu Apr 12 20:45:16 2012 +0200

    grep: handle symlinked directory loops as usual
    
    * src/main.c (grepfile): Treat EMLINK just like ELOOP, for
    systems like FreeBSD 9.0 on which we would otherwise report
    "Too many links" rather than ignoring that type of failure.
    E.g., "mkdir d; cd d; ln -s . a; grep -r ^" would print
    grep: a: Too many links and would exit with status 2.
    Now, it prints nothing and exits with status 1, as before.
    Reported by Nelson H. F. Beebe.

diff --git a/src/main.c b/src/main.c
index be1e2e6..82cae33 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1311,7 +1311,7 @@ grepfile (int dirdesc, char const *name, int follow, int 
command_line)
   int desc = openat_safer (dirdesc, name, O_RDONLY | (follow ? 0 : 
O_NOFOLLOW));
   if (desc < 0)
     {
-      if (follow || errno != ELOOP)
+      if (follow || (errno != ELOOP && errno != EMLINK))
         suppressible_error (filename, errno);
       return 1;
     }

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=92449ffdc47f1e7dd01fbc110eb094977dafb66a


commit 40679f5dbbb710bc3d09e0f410379fae20ba65e7
Author: Jim Meyering <address@hidden>
Date:   Thu Apr 12 20:45:16 2012 +0200

    grep: handle symlinked directory loops as usual
    
    * src/main.c (grepfile): Treat EMLINK just like ELOOP, for
    systems like FreeBSD 9.0 on which we would otherwise report
    "Too many links" rather than ignoring that type of failure.
    E.g., "mkdir d; cd d; ln -s . a; grep -r ^" would print
    grep: a: Too many links and would exit with status 2.
    Now, it prints nothing and exits with status 1, as before.
    Reported by Nelson H. F. Beebe.

diff --git a/src/main.c b/src/main.c
index be1e2e6..82cae33 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1311,7 +1311,7 @@ grepfile (int dirdesc, char const *name, int follow, int 
command_line)
   int desc = openat_safer (dirdesc, name, O_RDONLY | (follow ? 0 : 
O_NOFOLLOW));
   if (desc < 0)
     {
-      if (follow || errno != ELOOP)
+      if (follow || (errno != ELOOP && errno != EMLINK))
         suppressible_error (filename, errno);
       return 1;
     }

-----------------------------------------------------------------------

Summary of changes:
 src/main.c    |    2 +-
 tests/symlink |    8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]