Commit 80cfa786 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] UFS: honour `silent' parameter.

From: GOTO Masanori <gotom@debian.or.jp>

Teach ufs_fill_super() to honour the `silent' parameter.
parent c93123fe
...@@ -517,6 +517,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -517,6 +517,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
goto failed; goto failed;
} }
if (!(sbi->s_mount_opt & UFS_MOUNT_UFSTYPE)) { if (!(sbi->s_mount_opt & UFS_MOUNT_UFSTYPE)) {
if (!silent)
printk("You didn't specify the type of your ufs filesystem\n\n" printk("You didn't specify the type of your ufs filesystem\n\n"
"mount -t ufs -o ufstype=" "mount -t ufs -o ufstype="
"sun|sunx86|44bsd|old|hp|nextstep|netxstep-cd|openstep ...\n\n" "sun|sunx86|44bsd|old|hp|nextstep|netxstep-cd|openstep ...\n\n"
...@@ -576,6 +577,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -576,6 +577,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_sbbase = 0; uspi->s_sbbase = 0;
flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD; flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD;
if (!(sb->s_flags & MS_RDONLY)) { if (!(sb->s_flags & MS_RDONLY)) {
if (!silent)
printk(KERN_INFO "ufstype=old is supported read-only\n"); printk(KERN_INFO "ufstype=old is supported read-only\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
...@@ -590,6 +592,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -590,6 +592,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_sbbase = 0; uspi->s_sbbase = 0;
flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD; flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD;
if (!(sb->s_flags & MS_RDONLY)) { if (!(sb->s_flags & MS_RDONLY)) {
if (!silent)
printk(KERN_INFO "ufstype=nextstep is supported read-only\n"); printk(KERN_INFO "ufstype=nextstep is supported read-only\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
...@@ -604,6 +607,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -604,6 +607,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_sbbase = 0; uspi->s_sbbase = 0;
flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD; flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD;
if (!(sb->s_flags & MS_RDONLY)) { if (!(sb->s_flags & MS_RDONLY)) {
if (!silent)
printk(KERN_INFO "ufstype=nextstep-cd is supported read-only\n"); printk(KERN_INFO "ufstype=nextstep-cd is supported read-only\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
...@@ -618,6 +622,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -618,6 +622,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_sbbase = 0; uspi->s_sbbase = 0;
flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD; flags |= UFS_DE_44BSD | UFS_UID_44BSD | UFS_ST_44BSD | UFS_CG_44BSD;
if (!(sb->s_flags & MS_RDONLY)) { if (!(sb->s_flags & MS_RDONLY)) {
if (!silent)
printk(KERN_INFO "ufstype=openstep is supported read-only\n"); printk(KERN_INFO "ufstype=openstep is supported read-only\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
...@@ -632,11 +637,13 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -632,11 +637,13 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_sbbase = 0; uspi->s_sbbase = 0;
flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD; flags |= UFS_DE_OLD | UFS_UID_OLD | UFS_ST_OLD | UFS_CG_OLD;
if (!(sb->s_flags & MS_RDONLY)) { if (!(sb->s_flags & MS_RDONLY)) {
if (!silent)
printk(KERN_INFO "ufstype=hp is supported read-only\n"); printk(KERN_INFO "ufstype=hp is supported read-only\n");
sb->s_flags |= MS_RDONLY; sb->s_flags |= MS_RDONLY;
} }
break; break;
default: default:
if (!silent)
printk("unknown ufstype\n"); printk("unknown ufstype\n");
goto failed; goto failed;
} }
...@@ -687,6 +694,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent) ...@@ -687,6 +694,7 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
uspi->s_sbbase += 8; uspi->s_sbbase += 8;
goto again; goto again;
} }
if (!silent)
printk("ufs_read_super: bad magic number\n"); printk("ufs_read_super: bad magic number\n");
goto failed; goto failed;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment