Date: Wed, 8 Sep 2010 16:09:14 -0700 From: mdf@FreeBSD.org To: Gordon Tetlow <gordon@tetlows.org> Cc: Poul-Henning Kamp <phk@phk.freebsd.dk>, FreeBSD Arch <freebsd-arch@freebsd.org> Subject: Re: Extending sbufs with a drain Message-ID: <AANLkTin8f-htGPsotuqrfuFRdYAJ2-OFqpkjmPNGXnb4@mail.gmail.com> In-Reply-To: <AANLkTimDymwzicFXZHk-XDv7BvWXpt8WedYPEskRMrwx@mail.gmail.com> References: <AANLkTikerOYdEyT6jt7rAN3JP_N_oofq7ZXc4NptA4zP@mail.gmail.com> <67049.1283963396@critter.freebsd.dk> <AANLkTimDymwzicFXZHk-XDv7BvWXpt8WedYPEskRMrwx@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 8, 2010 at 3:35 PM, Gordon Tetlow <gordon@tetlows.org> wrote: > On Wed, Sep 8, 2010 at 9:29 AM, Poul-Henning Kamp <phk@phk.freebsd.dk> > wrote: >> >> In message <AANLkTikerOYdEyT6jt7rAN3JP_N_oofq7ZXc4NptA4zP@mail.gmail.com= >, >> mdf@ >> FreeBSD.org writes: >> >> For one thing, sbuf is not a kernel facility, it is a general purpose >> >> string editing library which is also used outside FreeBSD. =A0 If >> >> we add the drain facility it should work in both userland and kernel. >> > >> >Given that sys/sbuf.h is included in 100+ kernel files and 4 >> >user-space files, [...] >> >> That is probably more an indication that our userland is largely >> unchanged from 1995, whereas as everybody loves to hack up the >> kernel :-) =A0The various people who have told me they adopted sbufs >> have been very happy with them in userland. > > I would think that is more likely a result of the only documentation I se= e > for sbuf always refers to kernel implementation (sbuf(9), I don't see any > documentation for sbuf(3). Can you give some pointers? I've always hated > string manipulation in C, if I can find another way to do it, I'm all for > it. The sbuf(9) man page describes the library well. It's in lib/libsbuf, so link a userland application with -lsbuf. Cheers, matthew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTin8f-htGPsotuqrfuFRdYAJ2-OFqpkjmPNGXnb4>