From patchwork Mon Sep 28 19:10:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Chary X-Patchwork-Id: 34388 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 97CDBB7BC8 for ; Tue, 29 Sep 2009 05:11:41 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MsLbU-0005BJ-VT; Mon, 28 Sep 2009 19:09:44 +0000 Received: from iksaif.net ([88.191.73.63]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MsLbO-0004kO-JV for linux-mtd@lists.infradead.org; Mon, 28 Sep 2009 19:09:43 +0000 Received: from localhost.localdomain (cxr69-11-88-180-139-205.fbx.proxad.net [88.180.139.205]) (Authenticated sender: corentincj@iksaif.net) by iksaif.net (Postfix) with ESMTPA id 5CE42C90010; Mon, 28 Sep 2009 21:10:57 +0200 (CEST) From: Corentin Chary To: dedekind1@gmail.com Subject: [PATCH 2/2] UBIFS: Use ubi_open_volume_path() in open_ubi() Date: Mon, 28 Sep 2009 21:10:12 +0200 Message-Id: <1254165012-10798-2-git-send-email-corentincj@iksaif.net> X-Mailer: git-send-email 1.6.5.rc1 In-Reply-To: <1254165012-10798-1-git-send-email-corentincj@iksaif.net> References: <1254165012-10798-1-git-send-email-corentincj@iksaif.net> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20090928_150938_743915_D273885E X-CRM114-Status: UNSURE ( 7.77 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- _SUMMARY_ Cc: Corentin Chary , linux-mtd@lists.infradead.org, Adrian Hunter X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org 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 --- 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);