From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH] mount command: Fix "mount /dev/<devname>"
Date: Wed, 21 Nov 2018 12:59:04 +0100 [thread overview]
Message-ID: <20181121115904.26371-1-s.hauer@pengutronix.de> (raw)
We used to put the device name without the "/dev/" component into
device_detect_by_name() and cdev_by_name(). Since 8ca7053b3ff we only
put the device name into device_detect_by_name(), but cdev_by_name()
still gets the full path. The result is that a "mount /dev/<devname>" no
longer works. Fix this.
Fixes: 8ca7053b3ff ("commands: mount: Make use of devpath_to_name()")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
---
commands/mount.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/commands/mount.c b/commands/mount.c
index 834b06386b..f523f6b3b6 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -76,7 +76,9 @@ static int do_mount(int argc, char *argv[])
struct cdev *cdev;
const char *path;
- device_detect_by_name(devpath_to_name(devstr));
+ devstr = devpath_to_name(devstr);
+
+ device_detect_by_name(devstr);
cdev = cdev_by_name(devstr);
if (!cdev)
--
2.19.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
reply other threads:[~2018-11-21 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181121115904.26371-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox