[git commit branch/1_30_stable] ls: make -i compatible with coreutils: don't follow symlink by default

Denys Vlasenko vda.linux at googlemail.com
Thu Feb 14 13:40:57 UTC 2019


commit: https://git.busybox.net/busybox/commit/?id=a89ec68a8a62bbdc3e795057ec12423c86990de2
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_30_stable

Signed-off-by: Martijn Dekker <martijn at inlv.org>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/ls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/coreutils/ls.c b/coreutils/ls.c
index db3ddb944..b2adb0c06 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -1204,8 +1204,8 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
 	nfiles = 0;
 	do {
 		cur = my_stat(*argv, *argv,
-			/* follow links on command line unless -l, -s or -F: */
-			!(option_mask32 & (OPT_l|OPT_s|OPT_F))
+			/* follow links on command line unless -l, -i, -s or -F: */
+			!(option_mask32 & (OPT_l|OPT_i|OPT_s|OPT_F))
 			/* ... or if -H: */
 			|| (option_mask32 & OPT_H)
 			/* ... or if -L, but my_stat always follows links if -L */


More information about the busybox-cvs mailing list