From: Martijn Dekker Date: Fri, 4 Jan 2019 17:54:52 +0000 (+0100) Subject: ls: make -i compatible with coreutils: don't follow symlink by default X-Git-Tag: 1_31_0~232 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f83292cfc44da5bd218c2be0602c89afed9e0959;p=oweals%2Fbusybox.git ls: make -i compatible with coreutils: don't follow symlink by default Signed-off-by: Martijn Dekker Signed-off-by: Denys Vlasenko --- 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 */