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

Teach ufs_fill_super() to honour the `silent' parameter.


---

 fs/ufs/super.c |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff -puN fs/ufs/super.c~ufs-use-silent fs/ufs/super.c
--- 25/fs/ufs/super.c~ufs-use-silent	2004-01-26 21:10:33.000000000 -0800
+++ 25-akpm/fs/ufs/super.c	2004-01-26 21:10:33.000000000 -0800
@@ -516,7 +516,7 @@ static int ufs_fill_super(struct super_b
 		printk("wrong mount options\n");
 		goto failed;
 	}
-	if (!(sbi->s_mount_opt & UFS_MOUNT_UFSTYPE)) {
+	if (!(sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) && !silent) {
 		printk("You didn't specify the type of your ufs filesystem\n\n"
 		"mount -t ufs -o ufstype="
 		"sun|sunx86|44bsd|old|hp|nextstep|netxstep-cd|openstep ...\n\n"
@@ -575,7 +575,7 @@ static int ufs_fill_super(struct super_b
 		uspi->s_sbsize = super_block_size = 2048;
 		uspi->s_sbbase = 0;
 		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) && !silent) {
 			printk(KERN_INFO "ufstype=old is supported read-only\n"); 
 			sb->s_flags |= MS_RDONLY;
 		}
@@ -589,7 +589,7 @@ static int ufs_fill_super(struct super_b
 		uspi->s_sbsize = super_block_size = 2048;
 		uspi->s_sbbase = 0;
 		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) && !silent) {
 			printk(KERN_INFO "ufstype=nextstep is supported read-only\n");
 			sb->s_flags |= MS_RDONLY;
 		}
@@ -603,7 +603,7 @@ static int ufs_fill_super(struct super_b
 		uspi->s_sbsize = super_block_size = 2048;
 		uspi->s_sbbase = 0;
 		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) && !silent) {
 			printk(KERN_INFO "ufstype=nextstep-cd is supported read-only\n");
 			sb->s_flags |= MS_RDONLY;
 		}
@@ -617,7 +617,7 @@ static int ufs_fill_super(struct super_b
 		uspi->s_sbsize = super_block_size = 2048;
 		uspi->s_sbbase = 0;
 		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) && !silent) {
 			printk(KERN_INFO "ufstype=openstep is supported read-only\n");
 			sb->s_flags |= MS_RDONLY;
 		}
@@ -631,13 +631,14 @@ static int ufs_fill_super(struct super_b
 		uspi->s_sbsize = super_block_size = 2048;
 		uspi->s_sbbase = 0;
 		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) && !silent) {
 			printk(KERN_INFO "ufstype=hp is supported read-only\n");
 			sb->s_flags |= MS_RDONLY;
  		}
  		break;
 	default:
-		printk("unknown ufstype\n");
+		if (!silent)
+			printk("unknown ufstype\n");
 		goto failed;
 	}
 	
@@ -687,7 +688,8 @@ again:	
 		uspi->s_sbbase += 8;
 		goto again;
 	}
-	printk("ufs_read_super: bad magic number\n");
+	if (!silent)
+		printk("ufs_read_super: bad magic number\n");
 	goto failed;
 
 magic_found:

_