OSDN Git Service

The sense of -L was flipped.
authorElliott Hughes <enh@google.com>
Sat, 9 Jan 2016 00:43:17 +0000 (18:43 -0600)
committerRob Landley <rob@landley.net>
Sat, 9 Jan 2016 00:43:17 +0000 (18:43 -0600)
toys/posix/ls.c

index 5177dd9..2f44d24 100644 (file)
@@ -192,7 +192,7 @@ static int filter(struct dirtree *new)
       // fchmodat(), mknodat(), readlinkat() so we could do this without
       // even O_PATH? But no, this is 1990's tech.)
       int fd = openat(dirtree_parentfd(new), new->name,
-        O_PATH|(O_NOFOLLOW*!!(toys.optflags&FLAG_L)));
+        O_PATH|(O_NOFOLLOW*!(toys.optflags&FLAG_L)));
 
       if (fd != -1) {
         if (-1 == lsm_fget_context(fd, (char **)&new->extra) && errno == EBADF)