From 84f0a81899f92b8fb7800136a9fbd61e75a9745a Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Wed, 21 Dec 2011 09:07:56 +0100 Subject: commands/ls: add to use sorted-insert Added sorted insert to ls command. Signed-off-by: Alexander Aring Signed-off-by: Sascha Hauer --- commands/ls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands/ls.c') 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); } -- cgit v1.2.3