Re: [PATCH-2.4] make log buffer length selectable

Willy Tarreau
2003-08-27T20:54:41Z

On Wed, Aug 27, 2003 at 01:09:22PM -0700, Tom Rini wrote:
> On Tue, Aug 26, 2003 at 06:25:50AM +0200, Willy Tarreau wrote:
> > On Mon, Aug 25, 2003 at 04:48:30AM -0700, Marcelo Tosatti wrote:
> > > final:
> > >
> > > - 2.4.22-rc4 was released as 2.4.22 with no changes.
> >
> > Hi Marcelo,
> >
> > as you requested, here is the log_buf_len patch for inclusion in 23-pre.
>
> Two things. First, why not ask on every arch like 2.6 does? Second:

I'm sorry, shame on me. It was an old one that I first showed as an example,
and I blindly resent without checking. I'll do my best to backport code in 2.6
on the next sleepless night.

> > +#if !defined(CONFIG_LOG_BUF_SHIFT) || (CONFIG_LOG_BUF_SHIFT - 0 == 0)
>
> Why not just || (CONFIG_LOG_BUF_SHIFT == 0) ?

It's an old trick I was used to, but at other places. Basically, it was used
to avoid syntax errors when the macro was not defined, which would lead to
(-0 == 0) which is valid while ( == 0) is not. But it appears that cpp handles
the case correctly so it's not needed here. I'll fix it too.

Marcelo, sorry for this quick patch, I'll better check what I feed you next
time.

Cheers,
Willy