9
0
Fork 0

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>
This commit is contained in:
Alexander Aring 2011-12-21 09:07:56 +01:00 committed by Sascha Hauer
parent 049100fe37
commit 84f0a81899
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}