Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229076
b: refs/heads/master
c: 23a2ad6
h: refs/heads/master
v: v3
  • Loading branch information
Joe Perches authored and Jan Kara committed Jan 6, 2011
1 parent 5303d75 commit 3c18a40
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31d710a7bd42f0d89e30d53bdaad427c5f191d0d
refs/heads/master: 23a2ad6d0e58d0f2fb1647c2d6fef935bcaf9299
25 changes: 17 additions & 8 deletions trunk/fs/ext2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data);
static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf);
static int ext2_sync_fs(struct super_block *sb, int wait);

void ext2_error (struct super_block * sb, const char * function,
const char * fmt, ...)
void ext2_error(struct super_block *sb, const char *function,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;
struct ext2_sb_info *sbi = EXT2_SB(sb);
struct ext2_super_block *es = sbi->s_es;
Expand All @@ -59,9 +60,13 @@ void ext2_error (struct super_block * sb, const char * function,
}

va_start(args, fmt);
printk(KERN_CRIT "EXT2-fs (%s): error: %s: ", sb->s_id, function);
vprintk(fmt, args);
printk("\n");

vaf.fmt = fmt;
vaf.va = &args;

printk(KERN_CRIT "EXT2-fs (%s): error: %s: %pV\n",
sb->s_id, function, &vaf);

va_end(args);

if (test_opt(sb, ERRORS_PANIC))
Expand All @@ -76,12 +81,16 @@ void ext2_error (struct super_block * sb, const char * function,
void ext2_msg(struct super_block *sb, const char *prefix,
const char *fmt, ...)
{
struct va_format vaf;
va_list args;

va_start(args, fmt);
printk("%sEXT2-fs (%s): ", prefix, sb->s_id);
vprintk(fmt, args);
printk("\n");

vaf.fmt = fmt;
vaf.va = &args;

printk("%sEXT2-fs (%s): %pV\n", prefix, sb->s_id, &vaf);

va_end(args);
}

Expand Down

0 comments on commit 3c18a40

Please sign in to comment.