Date: Fri, 9 Dec 2011 16:30:17 GMT From: Jaakko Heinonen <jh@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs. Message-ID: <201112091630.pB9GUH6X002393@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/163076; it has been noted by GNATS. From: Jaakko Heinonen <jh@FreeBSD.org> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@des.no>, Petr Salinger <Petr.Salinger@seznam.cz>, bug-followup@FreeBSD.org, mdf@FreeBSD.org Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs. Date: Fri, 9 Dec 2011 18:23:18 +0200 On 2011-12-09, Poul-Henning Kamp wrote: > >As I wrote existing code depends on sbuf_len() to return the actual > >length regardless of the error status after sbuf_finish(). > > What do you mean by "actual length" ? > > The length it would have if there hadn't been errors ? No, I mean returning s->s_len instead of -1. s_len is the length of the string without the terminating NUL. s_len doesn't include the bytes that didn't fit to the buffer. -- Jaakko
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112091630.pB9GUH6X002393>