From owner-cvs-all Sun Feb 23 6:56:18 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60CD937B401; Sun, 23 Feb 2003 06:56:16 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 941E343F75; Sun, 23 Feb 2003 06:56:15 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id h1NEu3P4098839; Sun, 23 Feb 2003 09:56:03 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sun, 23 Feb 2003 09:56:02 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.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 In-Reply-To: <39831.1046011895@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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-all" in the body of the message