[PATCH 2/4] commands: mount: Make use of devpath_to_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 commands/mount.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/commands/mount.c b/commands/mount.c
index 4cf1179b7..834b06386 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)
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux