From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <13426df10707051258j34cf033dt10e99b79aaea0276@mail.gmail.com> Date: Thu, 5 Jul 2007 12:58:15 -0700 From: "ron minnich" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] implementing 9p read In-Reply-To: <84c03de05d2626f54ae08464b2933408@plan9.bell-labs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <468D3D99.8010802@wmipf.in-berlin.de> <84c03de05d2626f54ae08464b2933408@plan9.bell-labs.com> Topicbox-Message-UUID: 91abe1ce-ead2-11e9-9d60-3106f5b1d025 On 7/5/07, Sape Mullender wrote: > > Many control files are read using the helper routines readstr and readbuf > (see 9p(2)). > They extract from a string or buffer, the portion needed for the read > command, given seek offset and byte count. The string buffer is usually > generated anew for each read. another option is to only re-read when offset is 0. I.e., assume a non-zero offset means 'still reading'. But that approach has its own problems. ron