summaryrefslogtreecommitdiffstats
path: root/commands/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'commands/mount.c')
-rw-r--r--commands/mount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/mount.c b/commands/mount.c
index 834b06386b..f523f6b3b6 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -76,7 +76,9 @@ static int do_mount(int argc, char *argv[])
struct cdev *cdev;
const char *path;
- device_detect_by_name(devpath_to_name(devstr));
+ devstr = devpath_to_name(devstr);
+
+ device_detect_by_name(devstr);
cdev = cdev_by_name(devstr);
if (!cdev)