diff options
author | Franck Jullien <franck.jullien@gmail.com> | 2011-11-09 12:29:21 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-11-11 12:13:34 +0100 |
commit | 84b222987eea1a57308732c47a3006fecd6c8219 (patch) | |
tree | 1844500fc7f6977cd363bd0531ace9ec3c91afd8 /commands/mount.c | |
parent | 21d6ca209275a5f8449524658991c8ed99b88d08 (diff) | |
download | barebox-84b222987eea1a57308732c47a3006fecd6c8219.tar.gz barebox-84b222987eea1a57308732c47a3006fecd6c8219.tar.xz |
mount: Fix the printing of device name
Mount without argument always print a "none" as device name mounted
because entry->parent_device is always NULL.
The problem is the mount function in fs/fs.c. parent_device is
initialized to NULL and never updated. With this patch,
parent_device is set with the mounted device name.
Moreover, the mount function has been modified to print the device
name plus device id using the dev_name function.
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/mount.c')
-rw-r--r-- | commands/mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/mount.c b/commands/mount.c index 52d1700a78..7cefdbea24 100644 --- a/commands/mount.c +++ b/commands/mount.c @@ -40,7 +40,7 @@ static int do_mount(struct command *cmdtp, int argc, char *argv[]) entry = mtab_next_entry(entry); if (entry) { printf("%s on %s type %s\n", - entry->parent_device ? entry->parent_device->name : "none", + entry->parent_device ? dev_name(entry->parent_device) : "none", entry->path, entry->dev->name); } |