summaryrefslogtreecommitdiffstats
path: root/commands/mmc_extcsd.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-06-24 14:29:58 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-06-25 22:03:24 +0200
commitf20f5ec7444bec35961938ea5b7cc249a058665d (patch)
tree0803059177b6e51d5ffe8e503819656efafe7bf8 /commands/mmc_extcsd.c
parent8ca7053b3ffd12af20c2eff49082b6483b81d431 (diff)
downloadbarebox-f20f5ec7444bec35961938ea5b7cc249a058665d.tar.gz
commands: mmc_extcsd: Make use of devpath_to_name()
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/mmc_extcsd.c')
-rw-r--r--commands/mmc_extcsd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/commands/mmc_extcsd.c b/commands/mmc_extcsd.c
index 3a418ea..889a6c6 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;