For the record:

15:19 < meyering> so consider your ACK'd and I'll try to stay away from
IRC

Committed revision 1987.

Fabio

On Wed, 2009-04-01 at 13:59 +0200, Fabio M. Di Nitto wrote:
> On Wed, 2009-04-01 at 13:31 +0200, Fabio M. Di Nitto wrote:
> > On Wed, 2009-04-01 at 13:15 +0200, Fabio M. Di Nitto wrote:
> > > On Wed, 2009-04-01 at 11:09 +0200, Fabio M. Di Nitto wrote:
> > > > On Wed, 2009-04-01 at 10:40 +0200, Fabio M. Di Nitto wrote:
> > > > > Hi,
> > > > > 
> > > > > this patch replaces the one posted the 31st Of March and it's going to
> > > > > be my last take on it. I think I finally found nirvana and imho good
> > > > > enough to be out there :)
> > > > > 
> > > > > - add insert_into_buffer static function. This is a big helper to add
> > > > > new logsys parameters anywhere in the current format_buffer.
> > > > > It does some string manipulation that could probably be written to be
> > > > > faster, but given that this code is executed only at startup and on
> > > > > config reload, it will do.
> > > > > 
> > > > > - move new_format_buffer to be more global within the same function so
> > > > > it can be reused.
> > > > > 
> > > > > - add support for fileline (as documented) and function_name (new).
> > > > > 
> > > > > - simplify a lot also the timeline implementation.
> > > > > 
> > > > > - make sure to reset the format buffer on reload. This is required to
> > > > > set the new options properly (since we do not allow settings of custom
> > > > > formats, it's the simplest way to achieve removal).
> > > > > 
> > > > > - update corosync.conf.5 to add function_name.
> > > > > 
> > > > > As a general benefit, the new function insert_into_buffer, remove the
> > > > > requirement to parse the options in a specific order, but some care
> > > > > still need to be taken to set the "after" bit in case of insert new
> > > > > tokens into the format buffer.
> > > > 
> > > > A few little changes after Jim's review on IRC:
> > > > 
> > > > - make current_format const
> > > > - move templen, afterpos and afterlen down in the block where they are
> > > > used.
> > > > - strstr should check against != NULL and not > 0.
> > > 
> > > A few more changes after another review from Jim on IRC:
> > > 
> > > - document insert_into_buffer function to make sure it's not misused.
> > > - add bufferlen to insert_into_buffer call.
> > > - return -1 if we are truncating in snprintf operations.
> > > - make afterpos const.
> > > 
> > > Extra bonus:
> > > - fix return value if entry is already part of current format string.
> > > 
> > > Fabio
> > > 
> > > NOTE for me: At some point in your life you realize that nirvana doesn't
> > > exist ;)))
> > 
> > Another round of changes from Jim review:
> > 
> > - stop polluting with memset.
> 
> - Fix wrong bufferlen checks in snprintf
> 
> Fabio
> 
> _______________________________________________
> Openais mailing list
> [email protected]
> https://lists.linux-foundation.org/mailman/listinfo/openais

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to