summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--commands/mount.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/mount.c b/commands/mount.c
index 834b063..f523f6b 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)