[PATCH 3/4] commands: mmc_extcsd: 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/mmc_extcsd.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c
index 3a418ea5e..889a6c614 100644
--- a/commands/mmc_extcsd.c
+++ b/commands/mmc_extcsd.c
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <mci.h>
 #include <getopt.h>
+#include <fs.h>
 
 #define EXT_CSD_BLOCKSIZE	512
 
@@ -2404,10 +2405,8 @@ static int do_mmc_extcsd(int argc, char *argv[])
 		return COMMAND_ERROR_USAGE;
 
 	devname = argv[optind];
-	if (!strncmp(devname, "/dev/", 5))
-		devname += 5;
 
-	mci = mci_get_device_by_name(devname);
+	mci = mci_get_device_by_name(devpath_to_name(devname));
 	if (mci == NULL) {
 		retval = -ENOENT;
 		goto error;
-- 
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