diff options
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 9c87db4..5f53691 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -2241,8 +2241,14 @@ static int ubifs_fill_super(struct super_block *sb, void *data, int silent) int err; c->vfs_sb = sb; +#ifndef __UBOOT__ /* Re-open the UBI device in read-write mode */ c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READWRITE); +#else + /* U-Boot read only mode */ + c->ubi = ubi_open_volume(c->vi.ubi_num, c->vi.vol_id, UBI_READONLY); +#endif + if (IS_ERR(c->ubi)) { err = PTR_ERR(c->ubi); goto out; |