Re: [patch 1/1] Audit return code of create_proc_*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


Attachment: pgp7ofdn5PKjz.pgp
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux