]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fs/fs.c: add symbolic link case to fs_ls_generic()
authorJoao Marcos Costa <joaomarcos.costa@bootlin.com>
Thu, 30 Jul 2020 13:33:51 +0000 (15:33 +0200)
committerTom Rini <trini@konsulko.com>
Sat, 8 Aug 2020 02:31:32 +0000 (22:31 -0400)
Adds an 'else if' statement inside the loop to check for symbolic links.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
fs/fs.c

diff --git a/fs/fs.c b/fs/fs.c
index 5b31a369f7ab30817e014b0987ce22c91f23d39b..17e4bc33f762eb72dc50bb05fdc6fa577c281166 100644 (file)
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -59,6 +59,9 @@ static int fs_ls_generic(const char *dirname)
                if (dent->type == FS_DT_DIR) {
                        printf("            %s/\n", dent->name);
                        ndirs++;
+               } else if (dent->type == FS_DT_LNK) {
+                       printf("    <SYM>   %s\n", dent->name);
+                       nfiles++;
                } else {
                        printf(" %8lld   %s\n", dent->size, dent->name);
                        nfiles++;