diff options
author | Alexander Aring <a.aring@phytec.de> | 2011-12-21 09:07:56 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-21 12:38:14 +0100 |
commit | 84f0a81899f92b8fb7800136a9fbd61e75a9745a (patch) | |
tree | 7750e6d3ba82c56e7d0df28962927e07b6e5d0c5 /commands/ls.c | |
parent | 049100fe37024979060df8af5702fa4214a2790e (diff) | |
download | barebox-84f0a81899f92b8fb7800136a9fbd61e75a9745a.tar.gz barebox-84f0a81899f92b8fb7800136a9fbd61e75a9745a.tar.xz |
commands/ls: add to use sorted-insert
Added sorted insert to ls command.
Signed-off-by: Alexander Aring <a.aring@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/ls.c')
-rw-r--r-- | commands/ls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/ls.c b/commands/ls.c index 278a8bcad2..070aa9002b 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -68,7 +68,7 @@ int ls(const char *path, ulong flags) if (stat(tmp, &s)) goto out; if (flags & LS_COLUMN) - string_list_add(&sl, d->d_name); + string_list_add_sorted(&sl, d->d_name); else ls_one(d->d_name, &s); } @@ -156,7 +156,7 @@ static int do_ls(struct command *cmdtp, int argc, char *argv[]) if (!(s.st_mode & S_IFDIR)) { if (flags & LS_COLUMN) - string_list_add(&sl, argv[o]); + string_list_add_sorted(&sl, argv[o]); else ls_one(argv[o], &s); } |