ubifs: Allow ubifsmount volume reference by number

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>
This commit is contained in:
Joe Hershberger
2012-11-01 16:54:18 +00:00
committed by Tom Rini
parent e40753b207
commit 949a771097
10 changed files with 13 additions and 14 deletions

View File

@@ -1164,10 +1164,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;
@@ -1186,7 +1185,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);