[PATCH] Add CONFIG_ANDROID_LOG support
Dmitry Shmidt
dimitrysh
Fri Feb 25 10:06:24 PST 2011
On Fri, Feb 25, 2011 at 6:47 AM, Jouni Malinen <j at w1.fi> wrote:
> On Thu, Feb 24, 2011 at 04:50:46PM -0800, Dmitry Shmidt wrote:
>> Subject: [PATCH] Add CONFIG_ANDROID_LOG support
>
> Thanks. I applied this otherwise, but left the wpa_debug_level change
> out for now. I agree with Johannes that this looks just odd:
>
>> +#ifdef CONFIG_ANDROID_LOG
>> +int wpa_debug_level = MSG_WARNING;
>> +#else
>> ?int wpa_debug_level = MSG_INFO;
>> +#endif
>
> Please also note this here:
>
>> +void android_printf(int level, char *format, ...)
>> + ? ? if (level >= wpa_debug_level) {
>
>> +void android_printf(int level, char *format, ...);
>> +
>> +#define wpa_printf(level, ...) \
>> + ? ? ? ?do { ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?\
>> + ? ? ? ? ? ?if ((level) >= MSG_DEBUG) { ? ? ? ? ? ? ? ? ?\
>> + ? ? ? ? ? ? ? ?android_printf((level), __VA_ARGS__); ? \
>
> Why is that MSG_DEBUG here? For now, I just replaced this with #define
> wpa_printf android_printf.
>
> --
> Jouni Malinen ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?PGP id EFC895FA
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
I agree, it was a "historical" change. Your approach is totally acceptable.
Thanks,
Dmitry
More information about the Hostap
mailing list