Skip to content

Commit a543715

Browse files
jeffmahoneytorvalds
authored andcommitted
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>
1 parent eba0030 commit a543715

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

‎fs/reiserfs/prints.c‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -268,21 +268,21 @@ void reiserfs_warning(struct super_block *sb, const char *fmt, ...)
268268
{
269269
do_reiserfs_warning(fmt);
270270
if (sb)
271-
printk(KERN_WARNING "ReiserFS: %s: warning: %s\n",
272-
reiserfs_bdevname(sb), error_buf);
271+
printk(KERN_WARNING "REISERFS warning (device %s): %s\n",
272+
sb->s_id, error_buf);
273273
else
274-
printk(KERN_WARNING "ReiserFS: warning: %s\n", error_buf);
274+
printk(KERN_WARNING "REISERFS warning: %s\n", error_buf);
275275
}
276276

277277
/* No newline.. reiserfs_info calls can be followed by printk's */
278278
void reiserfs_info(struct super_block *sb, const char *fmt, ...)
279279
{
280280
do_reiserfs_warning(fmt);
281281
if (sb)
282-
printk(KERN_NOTICE "ReiserFS: %s: %s",
283-
reiserfs_bdevname(sb), error_buf);
282+
printk(KERN_NOTICE "REISERFS (device %s): %s",
283+
sb->s_id, error_buf);
284284
else
285-
printk(KERN_NOTICE "ReiserFS: %s", error_buf);
285+
printk(KERN_NOTICE "REISERFS %s:", error_buf);
286286
}
287287

288288
/* 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, ...)
297297
#ifdef CONFIG_REISERFS_CHECK
298298
do_reiserfs_warning(fmt);
299299
if (s)
300-
printk(KERN_DEBUG "ReiserFS: %s: %s\n",
301-
reiserfs_bdevname(s), error_buf);
300+
printk(KERN_DEBUG "REISERFS debug (device %s): %s\n",
301+
s->s_id, error_buf);
302302
else
303-
printk(KERN_DEBUG "ReiserFS: %s\n", error_buf);
303+
printk(KERN_DEBUG "REISERFS debug: %s\n", error_buf);
304304
#endif
305305
}
306306

@@ -368,15 +368,15 @@ void reiserfs_abort(struct super_block *sb, int errno, const char *fmt, ...)
368368
do_reiserfs_warning(fmt);
369369

370370
if (reiserfs_error_panic(sb)) {
371-
panic(KERN_CRIT "REISERFS: panic (device %s): %s\n",
372-
reiserfs_bdevname(sb), error_buf);
371+
panic(KERN_CRIT "REISERFS panic (device %s): %s\n", sb->s_id,
372+
error_buf);
373373
}
374374

375-
if (sb->s_flags & MS_RDONLY)
375+
if (reiserfs_is_journal_aborted(SB_JOURNAL(sb)))
376376
return;
377377

378-
printk(KERN_CRIT "REISERFS: abort (device %s): %s\n",
379-
reiserfs_bdevname(sb), error_buf);
378+
printk(KERN_CRIT "REISERFS abort (device %s): %s\n", sb->s_id,
379+
error_buf);
380380

381381
sb->s_flags |= MS_RDONLY;
382382
reiserfs_journal_abort(sb, errno);

0 commit comments

Comments
 (0)