--
Elliott Hughes - http://who/enh - http://jessies.org/~enh/
Android native code/tools questions? Mail me/drop by/add me as a reviewer.
From 5c1872cad2a70548754598ec0084a507402b4762 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Sat, 14 Nov 2015 09:25:12 -0800
Subject: [PATCH] Fix ls -Z with symlinks.
The sense of -L was flipped.
---
toys/posix/ls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/toys/posix/ls.c b/toys/posix/ls.c
index 7d15935..cb24845 100644
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -191,7 +191,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)
--
2.6.0.rc2.230.g3dd15c0
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net