From f20f5ec7444bec35961938ea5b7cc249a058665d Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sun, 24 Jun 2018 14:29:58 -0700 Subject: commands: mmc_extcsd: Make use of devpath_to_name() Signed-off-by: Andrey Smirnov Signed-off-by: Sascha Hauer --- 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 3a418ea5e9..889a6c614a 100644 --- a/commands/mmc_extcsd.c +++ b/commands/mmc_extcsd.c @@ -22,6 +22,7 @@ #include #include #include +#include #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; -- cgit v1.2.3