Date: Fri, 9 Dec 2011 15:00:27 GMT From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/163076: It is not possible to read in chunks from linprocfs and procfs. Message-ID: <201112091500.pB9F0R5r020396@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: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> Cc: Jaakko Heinonen <jh@FreeBSD.org>, 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, 09 Dec 2011 14:51:15 +0000 In message <86d3bxaljt.fsf@ds4.des.no>, =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= wr ites: >Jaakko Heinonen <jh@FreeBSD.org> writes: >> As I wrote existing code depends on sbuf_len() to return the actual >> length regardless of the error status after sbuf_finish(). I am not >> willing to through all code using sbufs to check where it causes >> problems. phk@ asserts that r222004 is correct. > >What if the sbuf is in a state where asking for its length is >meaningless? It will always have a length, but the length may not represent all you tried to stuff into the sbuf, if the sbuf has failed. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112091500.pB9F0R5r020396>