From: Corentin Chary <corentincj@iksaif.net>
To: dedekind1@gmail.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
Corentin Chary <corentincj@iksaif.net>
Subject: [PATCH 2/2] UBIFS: Use ubi_open_volume_path() in open_ubi()
Date: Tue, 29 Sep 2009 19:29:47 +0200 [thread overview]
Message-ID: <1254245387-14629-2-git-send-email-corentincj@iksaif.net> (raw)
In-Reply-To: <1254245387-14629-1-git-send-email-corentincj@iksaif.net>
This is needed to use $ mount /dev/ubi0_0 /mnt/nand
You'll also need a recent libblkid with UBI and UBIFS
support.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
---
fs/ubifs/super.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index 7e2b3d4..146289b 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -1847,6 +1847,7 @@ const struct super_operations ubifs_super_operations = {
* o ubiY - UBI device number 0, volume Y;
* o ubiX:NAME - mount UBI device X, volume with name NAME;
* o ubi:NAME - mount UBI device 0, volume with name NAME.
+ * o PATH - For example /dev/ubi0_0
*
* Alternative '!' separator may be used instead of ':' (because some shells
* like busybox may interpret ':' as an NFS host name separator). This function
@@ -1855,9 +1856,15 @@ const struct super_operations ubifs_super_operations = {
*/
static struct ubi_volume_desc *open_ubi(const char *name, int mode)
{
+ struct ubi_volume_desc *ubi;
int dev, vol;
char *endptr;
+ /* path method */
+ ubi = ubi_open_volume_path(name, mode);
+ if (!IS_ERR(ubi))
+ return ubi;
+
if (name[0] != 'u' || name[1] != 'b' || name[2] != 'i')
return ERR_PTR(-EINVAL);
--
1.6.5.rc1
prev parent reply other threads:[~2009-09-29 17:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1254234457.3778.84.camel@localhost>
2009-09-29 17:29 ` [PATCH 1/2] UBI: Add ubi_open_volume_path() Corentin Chary
2009-09-29 17:29 ` Corentin Chary [this message]
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=1254245387-14629-2-git-send-email-corentincj@iksaif.net \
--to=corentincj@iksaif.net \
--cc=dedekind1@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).