lkml.org 
[lkml]   [2005]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 1/1] Audit return code of create_proc_*
Date
Hi Domen,

On Friday 15 July 2005 00:19, you wrote:
> Audit return of create_proc_* functions.

This (and related changes) spam the log, if
kernel is compiled without /proc-support.

Kernels without /proc-support are quite common in the embedded world.

Just provide a function in a suitable header
(include/linux/proc_fs.h looks promising)
file, which contains the following:

#ifdef CONFIG_PROC_FS
#define procfs_failure(msg) do { printk(msg); } while(0)
#else
#define procfs_failure(msg) do {} while(0)
#endif
and use it instead of the direct printk call.

That way you get both: Your GCC or checking tool warning is silenced
and the log is not spammed for the embedded people.

For code, which is broken without procfs, the code
should be fixed or it should select PROC_FS in its Kconfig file.


Regards

Ingo Oeser


[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-07-16 14:01    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site