diff mbox series

[v4,5/6] fs/fs.c: add symbolic link case to fs_ls_generic()

Message ID 20200730133352.18223-6-joaomarcos.costa@bootlin.com
State Accepted
Commit 02c366b5d5f7022e573732fbe7b80c199e934d4f
Delegated to: Tom Rini
Headers show
Series Add support for the SquashFS filesystem | expand

Commit Message

Joao Marcos Costa July 30, 2020, 1:33 p.m. UTC
Adds an 'else if' statement inside the loop to check for symbolic links.

Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
---
Changes in v4:
	- No changes since v3.
Changes in v3:
	- No changes since v2.
Changes in v2:
	- This patch was added in v2 and did not exist in the last version.
 fs/fs.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Tom Rini Aug. 8, 2020, 12:31 p.m. UTC | #1
On Thu, Jul 30, 2020 at 03:33:51PM +0200, Joao Marcos Costa wrote:

> Adds an 'else if' statement inside the loop to check for symbolic links.
> 
> Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/fs/fs.c b/fs/fs.c
index 5b31a369f7..17e4bc33f7 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("    <SYM>   %s\n", dent->name);
+			nfiles++;
 		} else {
 			printf(" %8lld   %s\n", dent->size, dent->name);
 			nfiles++;