diff options
author | Alexey Fisher <bug-track@fisher-privat.net> | 2011-04-12 08:08:38 -0400 |
---|---|---|
committer | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2011-04-12 08:12:27 -0400 |
commit | 2c8a5ffb94bbb4f04aaf8a923e9098fb7a51a75a (patch) | |
tree | 75e2506ce7ab465898037672a5c901fd5303a486 /fs/fat | |
parent | 700309295551ef9217e4ae00a5b1d3030fc5438c (diff) |
fat: Convert fat_fs_error to use %pV
- convert fat_fs_error to use %pV
- be consequent and use "supor_block *sb" instead of "supor_block *s"
- use devise name in each message.
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Diffstat (limited to 'fs/fat')
-rw-r--r-- | fs/fat/fat.h | 10 | ||||
-rw-r--r-- | fs/fat/misc.c | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/fs/fat/fat.h b/fs/fat/fat.h index dc163b8d7699..a768dad77907 100644 --- a/fs/fat/fat.h +++ b/fs/fat/fat.h | |||
@@ -325,12 +325,12 @@ extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, | |||
325 | struct inode *i2); | 325 | struct inode *i2); |
326 | /* fat/misc.c */ | 326 | /* fat/misc.c */ |
327 | extern void | 327 | extern void |
328 | __fat_fs_error(struct super_block *s, int report, const char *fmt, ...) | 328 | __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...) |
329 | __attribute__ ((format (printf, 3, 4))) __cold; | 329 | __attribute__ ((format (printf, 3, 4))) __cold; |
330 | #define fat_fs_error(s, fmt, args...) \ | 330 | #define fat_fs_error(sb, fmt, args...) \ |
331 | __fat_fs_error(s, 1, fmt , ## args) | 331 | __fat_fs_error(sb, 1, fmt , ## args) |
332 | #define fat_fs_error_ratelimit(s, fmt, args...) \ | 332 | #define fat_fs_error_ratelimit(sb, fmt, args...) \ |
333 | __fat_fs_error(s, __ratelimit(&MSDOS_SB(s)->ratelimit), fmt , ## args) | 333 | __fat_fs_error(sb, __ratelimit(&MSDOS_SB(sb)->ratelimit), fmt , ## args) |
334 | extern int fat_clusters_flush(struct super_block *sb); | 334 | extern int fat_clusters_flush(struct super_block *sb); |
335 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); | 335 | extern int fat_chain_add(struct inode *inode, int new_dclus, int nr_cluster); |
336 | extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, | 336 | extern void fat_time_fat2unix(struct msdos_sb_info *sbi, struct timespec *ts, |
diff --git a/fs/fat/misc.c b/fs/fat/misc.c index 970e682ea754..e4f09629424e 100644 --- a/fs/fat/misc.c +++ b/fs/fat/misc.c | |||
@@ -20,26 +20,26 @@ | |||
20 | * In case the file system is remounted read-only, it can be made writable | 20 | * In case the file system is remounted read-only, it can be made writable |
21 | * again by remounting it. | 21 | * again by remounting it. |
22 | */ | 22 | */ |
23 | void __fat_fs_error(struct super_block *s, int report, const char *fmt, ...) | 23 | void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...) |
24 | { | 24 | { |
25 | struct fat_mount_options *opts = &MSDOS_SB(s)->options; | 25 | struct fat_mount_options *opts = &MSDOS_SB(sb)->options; |
26 | va_list args; | 26 | va_list args; |
27 | struct va_format vaf; | ||
27 | 28 | ||
28 | if (report) { | 29 | if (report) { |
29 | printk(KERN_ERR "FAT: Filesystem error (dev %s)\n", s->s_id); | ||
30 | |||
31 | printk(KERN_ERR " "); | ||
32 | va_start(args, fmt); | 30 | va_start(args, fmt); |
33 | vprintk(fmt, args); | 31 | vaf.fmt = fmt; |
32 | vaf.va = &args; | ||
33 | printk(KERN_ERR "FAT-fs (%s): error, %pV\n", sb->s_id, &vaf); | ||
34 | va_end(args); | 34 | va_end(args); |
35 | printk("\n"); | ||
36 | } | 35 | } |
37 | 36 | ||
38 | if (opts->errors == FAT_ERRORS_PANIC) | 37 | if (opts->errors == FAT_ERRORS_PANIC) |
39 | panic("FAT: fs panic from previous error\n"); | 38 | panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id); |
40 | else if (opts->errors == FAT_ERRORS_RO && !(s->s_flags & MS_RDONLY)) { | 39 | else if (opts->errors == FAT_ERRORS_RO && !(sb->s_flags & MS_RDONLY)) { |
41 | s->s_flags |= MS_RDONLY; | 40 | sb->s_flags |= MS_RDONLY; |
42 | printk(KERN_ERR "FAT: Filesystem has been set read-only\n"); | 41 | printk(KERN_ERR "FAT-fs (%s): Filesystem has been " |
42 | "set read-only\n", sb->s_id); | ||
43 | } | 43 | } |
44 | } | 44 | } |
45 | EXPORT_SYMBOL_GPL(__fat_fs_error); | 45 | EXPORT_SYMBOL_GPL(__fat_fs_error); |