From owner-freebsd-arch Thu Jan 11 7: 4:19 2001 Delivered-To: freebsd-arch@freebsd.org Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by hub.freebsd.org (Postfix) with ESMTP id 01E7437B402 for ; Thu, 11 Jan 2001 07:04:02 -0800 (PST) Received: from scsiguy.com (localhost [127.0.0.1]) by aslan.scsiguy.com (8.11.0/8.9.3) with ESMTP id f0BF3ws29178; Thu, 11 Jan 2001 08:03:58 -0700 (MST) (envelope-from gibbs@scsiguy.com) Message-Id: <200101111503.f0BF3ws29178@aslan.scsiguy.com> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Dag-Erling Smorgrav Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Proposed chage to sbuf semantics. In-Reply-To: Your message of "11 Jan 2001 15:50:02 +0100." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Jan 2001 08:03:58 -0700 From: "Justin T. Gibbs" Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >OK, how about sbuf_finish() clears the overflow but still returns -1? But sbuf_finish() hasn't failed. Remember that I've had the oportunity to notice the overflow on every other sbuf function invokation and I've chosen to ignore it. So long as SBUF_HASOVERFLOWED (or a function equivalent) is provided, any caller that really cares can check prior to calling sbuf_finish(). One other point. It would be nice if the return values were in the errno style unless you believe that the only error that can ever be returned indicates that an overflow occurred. >> I didn't read the man page, I read the code. > >This is FreeBSD, not Linux. I hardly see how this matters. Private interfaces should be documented as such in the header file (or not exist there at all) as well as the man page. Sometimes reading the code is easier than reading the man page and regardless of how you feel about the necessity of reading the man page the fact is that some people wont. -- Justin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message