Browse Source

reiserfs: use more consistent printk formatting

The output format between a warning/error/panic/info/etc changes with
which one is used.

The following patch makes the messages more internally consistent, but also
more consistent with other Linux filesystems.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jeff Mahoney 16 years ago
parent
commit
a5437152ee
1 changed files with 14 additions and 14 deletions
  1. 14 14
      fs/reiserfs/prints.c

+ 14 - 14
fs/reiserfs/prints.c

@@ -268,10 +268,10 @@ void reiserfs_warning(struct super_block *sb, const char *fmt, ...)
 {
 {
 	do_reiserfs_warning(fmt);
 	do_reiserfs_warning(fmt);
 	if (sb)
 	if (sb)
-		printk(KERN_WARNING "ReiserFS: %s: warning: %s\n",
-		       reiserfs_bdevname(sb), error_buf);
+		printk(KERN_WARNING "REISERFS warning (device %s): %s\n",
+		       sb->s_id, error_buf);
 	else
 	else
-		printk(KERN_WARNING "ReiserFS: warning: %s\n", error_buf);
+		printk(KERN_WARNING "REISERFS warning: %s\n", error_buf);
 }
 }
 
 
 /* No newline.. reiserfs_info calls can be followed by printk's */
 /* No newline.. reiserfs_info calls can be followed by printk's */
@@ -279,10 +279,10 @@ void reiserfs_info(struct super_block *sb, const char *fmt, ...)
 {
 {
 	do_reiserfs_warning(fmt);
 	do_reiserfs_warning(fmt);
 	if (sb)
 	if (sb)
-		printk(KERN_NOTICE "ReiserFS: %s: %s",
-		       reiserfs_bdevname(sb), error_buf);
+		printk(KERN_NOTICE "REISERFS (device %s): %s",
+		       sb->s_id, error_buf);
 	else
 	else
-		printk(KERN_NOTICE "ReiserFS: %s", error_buf);
+		printk(KERN_NOTICE "REISERFS %s:", error_buf);
 }
 }
 
 
 /* No newline.. reiserfs_printk calls can be followed by printk's */
 /* No newline.. reiserfs_printk calls can be followed by printk's */
@@ -297,10 +297,10 @@ void reiserfs_debug(struct super_block *s, int level, const char *fmt, ...)
 #ifdef CONFIG_REISERFS_CHECK
 #ifdef CONFIG_REISERFS_CHECK
 	do_reiserfs_warning(fmt);
 	do_reiserfs_warning(fmt);
 	if (s)
 	if (s)
-		printk(KERN_DEBUG "ReiserFS: %s: %s\n",
-		       reiserfs_bdevname(s), error_buf);
+		printk(KERN_DEBUG "REISERFS debug (device %s): %s\n",
+		       s->s_id, error_buf);
 	else
 	else
-		printk(KERN_DEBUG "ReiserFS: %s\n", error_buf);
+		printk(KERN_DEBUG "REISERFS debug: %s\n", error_buf);
 #endif
 #endif
 }
 }
 
 
@@ -368,15 +368,15 @@ void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...)
 	do_reiserfs_warning(fmt);
 	do_reiserfs_warning(fmt);
 
 
 	if (reiserfs_error_panic(sb)) {
 	if (reiserfs_error_panic(sb)) {
-		panic(KERN_CRIT "REISERFS: panic (device %s): %s\n",
-		      reiserfs_bdevname(sb), error_buf);
+		panic(KERN_CRIT "REISERFS panic (device %s): %s\n", sb->s_id,
+		      error_buf);
 	}
 	}
 
 
-	if (sb->s_flags & MS_RDONLY)
+	if (reiserfs_is_journal_aborted(SB_JOURNAL(sb)))
 		return;
 		return;
 
 
-	printk(KERN_CRIT "REISERFS: abort (device %s): %s\n",
-	       reiserfs_bdevname(sb), error_buf);
+	printk(KERN_CRIT "REISERFS abort (device %s): %s\n", sb->s_id,
+	       error_buf);
 
 
 	sb->s_flags |= MS_RDONLY;
 	sb->s_flags |= MS_RDONLY;
 	reiserfs_journal_abort(sb, errno);
 	reiserfs_journal_abort(sb, errno);