diff options
Diffstat (limited to 'fs/udf/udfdecl.h')
-rw-r--r-- | fs/udf/udfdecl.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h index 85e15edc080..f3d44986730 100644 --- a/fs/udf/udfdecl.h +++ b/fs/udf/udfdecl.h @@ -1,6 +1,8 @@ #ifndef __UDF_DECL_H #define __UDF_DECL_H +#define pr_fmt(fmt) "UDF-fs: " fmt + #include "ecma_167.h" #include "osta_udf.h" @@ -16,18 +18,11 @@ #define UDF_PREALLOCATE #define UDF_DEFAULT_PREALLOC_BLOCKS 8 -#undef UDFFS_DEBUG - -#ifdef UDFFS_DEBUG -#define udf_debug(f, a...) \ -do { \ - printk(KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \ - __FILE__, __LINE__, __func__); \ - printk(f, ##a); \ -} while (0) -#else -#define udf_debug(f, a...) /**/ -#endif +__attribute__((format(printf, 3, 4))) +extern void _udf_err(struct super_block *sb, const char *function, + const char *fmt, ...); +#define udf_err(sb, fmt, ...) \ + _udf_err(sb, __func__, fmt, ##__VA_ARGS__) __attribute__((format(printf, 3, 4))) extern void _udf_warn(struct super_block *sb, const char *function, @@ -35,14 +30,19 @@ extern void _udf_warn(struct super_block *sb, const char *function, #define udf_warn(sb, fmt, ...) \ _udf_warn(sb, __func__, fmt, ##__VA_ARGS__) -__attribute__((format(printf, 3, 4))) -extern void _udf_err(struct super_block *sb, const char *function, - const char *fmt, ...); -#define udf_err(sb, fmt, ...) \ - _udf_err(sb, __func__, fmt, ##__VA_ARGS__) +#define udf_info(fmt, ...) \ + pr_info("INFO " fmt, ##__VA_ARGS__) -#define udf_info(f, a...) \ - printk(KERN_INFO "UDF-fs INFO " f, ##a); +#undef UDFFS_DEBUG + +#ifdef UDFFS_DEBUG +#define udf_debug(fmt, ...) \ + printk(KERN_DEBUG pr_fmt("%s:%d:%s: " fmt), \ + __FILE__, __LINE__, __func__, ##__VA_ARGS__) +#else +#define udf_debug(fmt, ...) \ + no_printk(fmt, ##__VA_ARGS__) +#endif #define udf_fixed_to_variable(x) ( ( ( (x) >> 5 ) * 39 ) + ( (x) & 0x0000001F ) ) #define udf_variable_to_fixed(x) ( ( ( (x) / 39 ) << 5 ) + ( (x) % 39 ) ) |