Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 2003 09:56:02 -0500 (EST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        phk@phk.freebsd.dk
Cc:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/sys libkern.h malloc.h src/sys/libkern strdup.c src/sys/conf files 
Message-ID:  <Pine.NEB.3.96L.1030223095432.64781E-100000@fledge.watson.org>
In-Reply-To: <39831.1046011895@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, 23 Feb 2003 phk@phk.freebsd.dk wrote:

> In message <200302231430.h1NEUHZb068134@repoman.freebsd.org>, Robert Watson wri
> tes:
> >rwatson     2003/02/23 06:30:17 PST
> >
> >  Modified files:
> >    sys/sys              malloc.h libkern.h 
> >    sys/conf             files 
> >  Added files:
> >    sys/libkern          strdup.c 
> >  Log:
> >  Add an implementation of strdup() to libkern.  Allocated memory is of
> >  type M_STRING, now defined in malloc.h.  Useful when string parsing
> >  must occur using the kernel strsep() and we want to avoid toasting
> >  the source string.
> 
> You should really consider using sbuf's instead.

The sbuf routines are great for output, and the module I'm working on uses
them for output, but my understanding is that we don't currently have
tokenizing routines for sbufs.  If we do, they need to be better
documented in the man page :-).  I agree in principle, however, and if we
don't have sbuf_tokenize() in some form or another, we should seriously
consider adding it. 

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert@fledge.watson.org      Network Associates Laboratories



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1030223095432.64781E-100000>