diff options
author | Joe Perches <joe@perches.com> | 2012-07-30 17:40:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-30 20:25:14 -0400 |
commit | 533574c6bc30cf526cc1c41bde050c854a945efb (patch) | |
tree | 0e019132044f1c8b4a46c33adba3445a2730c5a7 /fs/btrfs/ctree.h | |
parent | 0cc41e4a21d43695154fe6a151abf3b6f27b0bb0 (diff) |
btrfs: use printk_get_level and printk_skip_level, add __printf, fix fallout
Use the generic printk_get_level() to search a message for a kern_level.
Add __printf to verify format and arguments. Fix a few messages that
had mismatches in format and arguments. Add #ifdef CONFIG_PRINTK blocks
to shrink the object size a bit when not using printk.
[akpm@linux-foundation.org: whitespace tweak]
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index adb1cd7ceb9b..4bab807227ad 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -3342,10 +3342,22 @@ ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size); | |||
3342 | /* super.c */ | 3342 | /* super.c */ |
3343 | int btrfs_parse_options(struct btrfs_root *root, char *options); | 3343 | int btrfs_parse_options(struct btrfs_root *root, char *options); |
3344 | int btrfs_sync_fs(struct super_block *sb, int wait); | 3344 | int btrfs_sync_fs(struct super_block *sb, int wait); |
3345 | |||
3346 | #ifdef CONFIG_PRINTK | ||
3347 | __printf(2, 3) | ||
3345 | void btrfs_printk(struct btrfs_fs_info *fs_info, const char *fmt, ...); | 3348 | void btrfs_printk(struct btrfs_fs_info *fs_info, const char *fmt, ...); |
3349 | #else | ||
3350 | static inline __printf(2, 3) | ||
3351 | void btrfs_printk(struct btrfs_fs_info *fs_info, const char *fmt, ...) | ||
3352 | { | ||
3353 | } | ||
3354 | #endif | ||
3355 | |||
3356 | __printf(5, 6) | ||
3346 | void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function, | 3357 | void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function, |
3347 | unsigned int line, int errno, const char *fmt, ...); | 3358 | unsigned int line, int errno, const char *fmt, ...); |
3348 | 3359 | ||
3360 | |||
3349 | void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, | 3361 | void __btrfs_abort_transaction(struct btrfs_trans_handle *trans, |
3350 | struct btrfs_root *root, const char *function, | 3362 | struct btrfs_root *root, const char *function, |
3351 | unsigned int line, int errno); | 3363 | unsigned int line, int errno); |
@@ -3386,6 +3398,7 @@ do { \ | |||
3386 | (errno), fmt, ##args); \ | 3398 | (errno), fmt, ##args); \ |
3387 | } while (0) | 3399 | } while (0) |
3388 | 3400 | ||
3401 | __printf(5, 6) | ||
3389 | void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function, | 3402 | void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function, |
3390 | unsigned int line, int errno, const char *fmt, ...); | 3403 | unsigned int line, int errno, const char *fmt, ...); |
3391 | 3404 | ||