Em Mon, Oct 07, 2002 at 08:47:33PM -0300, Arnaldo C. Melo escreveu:
> Em Tue, Oct 08, 2002 at 12:23:27AM +0100, Alan Cox escreveu:
> > On Tue, 2002-10-08 at 00:01, Arnaldo Carvalho de Melo wrote:
> > to tweak
> > > > the values exactly how we want in a specific application. The tweaking
> > > > options can be buried under advanced kernel options with the appropriate
> > > > disclaimers about shooting yourself in the foot.
> > > That is how I think it should be done, yes.
> > Submitting dprintk() seems like a great starting point. I've also got
> > some patches in the archive someone sent that allows you to configure
> > out the #! exec stuff
> Ok, will do that in the next days.
Ok, so what do you think of a include/linux/debug.h
and a CONFIG_DEBUG_MESSAGES
and in debug.h:
#ifdef CONFIG_DEBUG_MESSAGES
#define dprintk printk(KERN_DEBUG.....) /* find the best of the 1001 variants
already in the tree */
#else
#define dprintk(.....)
#endif
and in drivers currently using dprintk (and in others that want to start using
it instead of homebrew equivalent macros):
#include <linux/debug.h>
...happily use dprintk...
and the default kernel config would just disable (or other sane default agreed
here) so, assuming it is disabled it'd be easy to enable it on a per source
code file, doing this:
#include <other_includes>
#define CONFIG_DEBUG_MESSAGES
#include <linux/debug.h>
Would this be acceptable? Ah, all of the above is quickly hacked pseudocode 8)
- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 22:01:02 EST