]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
ubifs: Allow ubifsmount volume reference by number
authorJoe Hershberger <joe.hershberger@ni.com>
Wed, 13 Jun 2012 01:22:19 +0000 (20:22 -0500)
committerJohn Linn <john.linn@xilinx.com>
Tue, 19 Jun 2012 21:21:29 +0000 (14:21 -0700)
UBI can mount volumes by name or number  The current code forces you
to name the volume by prepending every name with "ubi:".

From fs/ubifs/super.c
 * There are several ways to specify UBI volumes when mounting UBIFS:
 * o ubiX_Y    - UBI device number X, volume Y;
 * 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.

Now any name passed in any of the above forms are allowed.

Also update the configs that referenced ubifsmount.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
fs/ubifs/super.c
include/configs/dockstar.h
include/configs/omap3_pandora.h

index 63b2164d30484072a1ff010ea046acf38d9d020f..78fca27dd2892f33a4cb0758c0770347ddf158ca 100644 (file)
@@ -1162,10 +1162,9 @@ static struct file_system_type ubifs_fs_type = {
        .get_sb  = ubifs_get_sb,
 };
 
-int ubifs_mount(char *vol_name)
+int ubifs_mount(char *name)
 {
        int flags;
-       char name[80] = "ubi:";
        void *data;
        struct vfsmount *mnt;
        int ret;
@@ -1184,7 +1183,6 @@ int ubifs_mount(char *vol_name)
         * Mount in read-only mode
         */
        flags = MS_RDONLY;
-       strcat(name, vol_name);
        data = NULL;
        mnt = NULL;
        ret = ubifs_get_sb(&ubifs_fs_type, flags, name, data, mnt);
index 249f93bf130f3baa8206a20093096cb5a68c4df6..63d5e35e92949815d293ab7868a526c17deecbe5 100644 (file)
@@ -85,7 +85,7 @@
 #define CONFIG_BOOTCOMMAND \
        "setenv bootargs ${console} ${mtdparts} ${bootargs_root}; "     \
        "ubi part root; " \
-       "ubifsmount root; " \
+       "ubifsmount ubi:root; " \
        "ubifsload 0x800000 ${kernel}; " \
        "ubifsload 0x1100000 ${initrd}; " \
        "bootm 0x800000 0x1100000"
index 72b0cc223b47c72fe4496cd23678d2e599d28ea6..dd66dfcfb147d53fc8b04a879f82d8ce6eaddc6d 100644 (file)
                        "ext2load mmc1 0 ${loadaddr} autoboot.scr; then " \
                "source ${loadaddr}; " \
        "fi; " \
-       "ubi part boot && ubifsmount boot && ubifsload ${loadaddr} uImage && bootm ${loadaddr}"
+       "ubi part boot && ubifsmount ubi:boot && " \
+       "ubifsload ${loadaddr} uImage && bootm ${loadaddr}"
 
 #define CONFIG_AUTO_COMPLETE   1
 /*