Re: [PATCH 1/2] udf : enable error print in udf_read_tagged().

From: NamJae Jeon
Date: Mon Oct 03 2011 - 03:20:51 EST


2011/10/3 Joe Perches <joe@xxxxxxxxxxx>:
> On Mon, 2011-10-03 at 13:55 +0900, Namjae Jeon wrote:
>> While reading metadata, if a problem occurs,
>> Print out only one of the five case.(It also does not show a checksum properly.)
>> Because currently it have been disable by undef udf_debug.
>> If there is a problem with scratched disc or loader, the user needs to know which error happened.
>> And I use pr_fmt instead of printk by joe's suggestion. I try to modify totally it to pr_fmt also.
> []
>> diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
> []
>> @@ -21,7 +23,7 @@
>> Â#ifdef UDFFS_DEBUG
>> Â#define udf_debug(f, a...) \
>> Âdo { \
>> - Â Â printk(KERN_DEBUG "UDF-fs DEBUG %s:%d:%s: ", \
>> + Â Â pr_debug("DEBUG %s:%d:%s: ", \
>> Â Â Â Â Â Â Â __FILE__, __LINE__, __func__); \
>> Â Â Â printk(f, ##a); \
>
> This isn't the same.
>
> You should probably just use
>
> #define udf_debug(fmt, ...) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> Â Â Â Âpr_debug("DEBUG %s:%d:%s: " fmt, Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â\
> Â Â Â Â Â Â Â Â __FILE__, __LINE__, __func__, __VA_ARGS__)
>
> or maybe let dynamic_debug add
> __FILE__, __LINE__ and __func__
> via the appropriate controls,
> so this might be appropriate.
>
> #define udf_debug(fmt, ...) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â \
> Â Â Â Âpr_debug("DEBUG " fmt, __VA_ARGS__)
>
Thanks joe~
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/