From: Joao Marcos Costa Date: Mon, 20 Jul 2020 15:50:08 +0200 Subject: [PATCH v2 5/5] fs/fs.c: add symbolic link case to fs_ls_generic() In-Reply-To: <20200720135008.23786-1-joaomarcos.costa@bootlin.com> References: <20200720135008.23786-1-joaomarcos.costa@bootlin.com> Message-ID: <20200720135008.23786-6-joaomarcos.costa@bootlin.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Adds an 'else if' statement inside the loop to check for symbolic links. Signed-off-by: Joao Marcos Costa --- Changes in v2: - Changed commit title and message, which were wrong and/or misleading in v1. fs/fs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/fs.c b/fs/fs.c index 6d776c676a..e06f87db99 100644 --- 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(" %s\n", dent->name); + nfiles++; } else { printf(" %8lld %s\n", dent->size, dent->name); nfiles++; -- 2.17.1