summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-02-17 10:27:31 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-02-17 10:27:31 +0100
commit2546c5a514e57c0efaeb1664006b2af14d3c0590 (patch)
tree17cef9339fdc6fb12ecf72ef27c51d96022ffed2 /commands
parentc6a87e145cea8af8c7545a0406aa8f8dd9146c92 (diff)
parent491cc29b0a2cf7c675e94e00eed2d58934a76011 (diff)
downloadbarebox-2546c5a514e57c0efaeb1664006b2af14d3c0590.tar.gz
barebox-2546c5a514e57c0efaeb1664006b2af14d3c0590.tar.xz
Merge branch 'pu/device-cleanup' into next
Diffstat (limited to 'commands')
-rw-r--r--commands/mount.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/commands/mount.c b/commands/mount.c
index 7cefdbea24..926cd3fbf9 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -33,18 +33,15 @@
static int do_mount(struct command *cmdtp, int argc, char *argv[])
{
int ret = 0;
- struct mtab_entry *entry = NULL;
+ struct mtab_entry *entry;
if (argc == 1) {
- do {
- entry = mtab_next_entry(entry);
- if (entry) {
- printf("%s on %s type %s\n",
- entry->parent_device ? dev_name(entry->parent_device) : "none",
- entry->path,
- entry->dev->name);
- }
- } while (entry);
+ for_each_mtab_entry(entry) {
+ printf("%s on %s type %s\n",
+ entry->parent_device ? dev_name(entry->parent_device) : "none",
+ entry->path,
+ entry->dev->name);
+ }
return 0;
}