aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/fat/misc.c
diff options
context:
space:
mode:
authorAlexey Fisher <bug-track@fisher-privat.net>2011-04-12 21:08:38 +0900
committerOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>2011-04-12 21:12:35 +0900
commit81ac21d34a91e85b029cd86e2ed5eeae8d7c3cd4 (patch)
treeec3319428a074a2d9694844612f6fcbb39e21d53 /fs/fat/misc.c
parentfat: Convert fat_fs_error to use %pV (diff)
downloadwireguard-linux-81ac21d34a91e85b029cd86e2ed5eeae8d7c3cd4.tar.xz
wireguard-linux-81ac21d34a91e85b029cd86e2ed5eeae8d7c3cd4.zip
fat: Add fat_msg() function for preformated FAT messages
Add fat_msg() to replace not cosequent used printk() in fs/fat/* New message format should be as fallow: FAT-fs (sda1): some thing happened. 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/misc.c')
-rw-r--r--fs/fat/misc.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/fat/misc.c b/fs/fat/misc.c
index e4f09629424e..3dcabc1bd8c3 100644
--- a/fs/fat/misc.c
+++ b/fs/fat/misc.c
@@ -44,6 +44,22 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
}
EXPORT_SYMBOL_GPL(__fat_fs_error);
+/**
+ * fat_msg() - print preformated FAT specific messages. Every thing what is
+ * not fat_fs_error() should be fat_msg().
+ */
+void fat_msg(struct super_block *sb, const char *level, const char *fmt, ...)
+{
+ struct va_format vaf;
+ va_list args;
+
+ va_start(args, fmt);
+ vaf.fmt = fmt;
+ vaf.va = &args;
+ printk("%sFAT-fs (%s): %pV\n", level, sb->s_id, &vaf);
+ va_end(args);
+}
+
/* Flushes the number of free clusters on FAT32 */
/* XXX: Need to write one per FSINFO block. Currently only writes 1 */
int fat_clusters_flush(struct super_block *sb)