From 8ca7053b3ffd12af20c2eff49082b6483b81d431 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sun, 24 Jun 2018 14:29:57 -0700 Subject: commands: mount: Make use of devpath_to_name() Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- commands/mount.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'commands/mount.c') 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) -- cgit v1.2.3