9
0
Fork 0

commands: mount: detect the device to be mounted

Before mounting a device try to detect it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2015-06-26 08:59:02 +02:00
parent c54fb2ecbd
commit fc34ff801b
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ static int do_mount(int argc, char *argv[])
if (!strncmp(devstr, "/dev/", 5))
devstr += 5;
device_detect_by_name(devstr);
cdev = cdev_by_name(devstr);
if (!cdev)
return -ENOENT;