summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-12-07 16:42:04 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-12-07 16:42:04 +0100
commitc3a84a3f760b3892501591f5a6b037611477dc9f (patch)
treeded61e87cdeb597fdf96edf72618ed9d518e74bd /commands
parenta0643f615d3f54866443050334229c984b83c1b1 (diff)
parentac6e464cb29e83c02c9e39a4b78a819d82b4f06b (diff)
downloadbarebox-c3a84a3f760b3892501591f5a6b037611477dc9f.tar.gz
barebox-c3a84a3f760b3892501591f5a6b037611477dc9f.tar.xz
Merge branch 'for-next/ext4'
Diffstat (limited to 'commands')
-rw-r--r--commands/bootm.c2
-rw-r--r--commands/ls.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 98d2e4faf6..483e6a1933 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -184,7 +184,7 @@ static int bootm_open_oftree(struct image_data *data, const char *oftree, int nu
}
}
- ft = file_detect_type(fdt);
+ ft = file_detect_type(fdt, size);
if (ft != filetype_oftree) {
printf("%s is not an oftree but %s\n", oftree,
file_type_to_string(ft));
diff --git a/commands/ls.c b/commands/ls.c
index 1fdb24406d..f2d990340f 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -73,12 +73,13 @@ int ls(const char *path, ulong flags)
while ((d = readdir(dir))) {
sprintf(tmp, "%s/%s", path, d->d_name);
- if (lstat(tmp, &s))
- goto out;
- if (flags & LS_COLUMN)
+ if (flags & LS_COLUMN) {
string_list_add_sorted(&sl, d->d_name);
- else
+ } else {
+ if (lstat(tmp, &s))
+ goto out;
ls_one(d->d_name, tmp, &s);
+ }
}
closedir(dir);