Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jul 2001 03:54:12 -0700
From:      Peter Wemm <peter@wemm.org>
To:        Dima Dorfman <dima@unixfreak.org>
Cc:        Sheldon Hearn <sheldonh@starjuice.net>, audit@freebsd.org
Subject:   Re: queue(3) patch for config(8) 
Message-ID:  <20010718105412.78F7238FD@overcee.netplex.com.au>
In-Reply-To: <20010718090116.8CCCB3E2F@bazooka.unixfreak.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Dima Dorfman wrote:
> Sheldon Hearn <sheldonh@starjuice.net> writes:
> > This one should almost certainly go past Peter Wemm.
> 
> Okay.  Peter (cc'd), the discussion is about a patch (attached below)
> to config(8) which converts all of its lists to the queue(3) API.
> This will make future modifications (esp. those which start removing
> arbitrary nodes from these lists) less error-prone.  Please review.
> 
> Thanks,

Please keep in mind that:
1: This code is doomed and will not live to 5.0-RELEASE.
2: TAILQ_FOREACH() etc is not portable.  If you're going to use this, then
   please provide fallbacks.  The strl*() needs to be fixed in the same way
   as it is a major headache to build a newer kernel on an older system.
3: We dont remove nodes from lists at all right now, at all.  The
   TAILQ_REMOVE()'s you've added are artificial as we're destroying the
   entire list.  There was no need to remove the notes as we're free()'ing
   it as we go.  This change just seems to complicate the code.
4: config (in general) doesn't free memory.  The few token places that
   do free memory (eg: the ones you're touching) are just a drop in the
   bucket compared to some of the other stuff.  There are no reference
   counts etc, things are just strdup()'ed all over the place "in case".

If you still want to do it, then go for your life.  But keep in mind that
it is right up on the top of my personal todo list for nuking this entire
block of code.  For now, what is there is quite adequate.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010718105412.78F7238FD>