summaryrefslogtreecommitdiffstats
path: root/commands/mount.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-06-24 14:29:57 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-25 22:03:24 +0200
commit8ca7053b3ffd12af20c2eff49082b6483b81d431 (patch)
treef73a5b10bd3993ad91c6b1370182a6a08fd11c55 /commands/mount.c
parent578db478b16f4f2ccb6ee17ccac17353d5f5d04c (diff)
downloadbarebox-8ca7053b3ffd12af20c2eff49082b6483b81d431.tar.gz
barebox-8ca7053b3ffd12af20c2eff49082b6483b81d431.tar.xz
commands: mount: Make use of devpath_to_name()
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/mount.c')
-rw-r--r--commands/mount.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/commands/mount.c b/commands/mount.c
index 4cf1179b7b..834b06386b 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -76,10 +76,7 @@ static int do_mount(int argc, char *argv[])
struct cdev *cdev;
const char *path;
- if (!strncmp(devstr, "/dev/", 5))
- devstr += 5;
-
- device_detect_by_name(devstr);
+ device_detect_by_name(devpath_to_name(devstr));
cdev = cdev_by_name(devstr);
if (!cdev)