diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-21 12:54:57 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-11-21 12:55:30 +0100 |
commit | 1eb65685357a3c0df0b3965d4ce1d6c54c306c56 (patch) | |
tree | 35472e9a5dad5048fdc01d282d0b14bf7464f88c /commands/mount.c | |
parent | 8b3633b261e50c6c96cefaa6e7f4acd26e8c2951 (diff) | |
download | barebox-1eb65685357a3c0df0b3965d4ce1d6c54c306c56.tar.gz |
mount command: Fix "mount /dev/<devname>"
We used to put the device name without the "/dev/" component into
device_detect_by_name() and cdev_by_name(). Since 8ca7053b3ff we only
put the device name into device_detect_by_name(), but cdev_by_name()
still gets the full path. The result is that a "mount /dev/<devname>" no
longer works. Fix this.
Fixes: 8ca7053b3ff ("commands: mount: Make use of devpath_to_name()")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Diffstat (limited to 'commands/mount.c')
-rw-r--r-- | commands/mount.c | 4 |
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) |