From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: David Presotto To: 9fans@cse.psu.edu Subject: Re: [9fans] errstr(2) In-Reply-To: <200403250708.i2P78MpX060659@adat.davidashen.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 25 Mar 2004 07:33:15 -0500 Topicbox-Message-UUID: 40e23590-eacd-11e9-9e20-41e7f4b1d025 On Thu Mar 25 02:10:54 EST 2004, dvd@davidashen.net wrote: > I have been unclear. error(5) suggests that messages can be > truncated to ERRMAX. 9/port/generrstr defines the buffer to be > of ERRMAX bytes long. > > The question is whether it means that if I define my buffer to > be ERRMAX bytes long, I am likely to get all the characters the > kernel provides, and the kernel is likely to keep all the characters > I pass to it through errstr(2). > > I am asking because errstr(2) mentions neither ERRMAX or error(5), > implies internal use of a fixed length buffer , and does not say > anything about truncating the user string to the size of the system > buffer's limit. Given that you looked at the implimentation of the system call, I take it that this question is rhetorical? You are right that we should mention ERRMAX in errstr(2) since it is indeed the size of the system buffer. I've changed the man page. Also, the error(5) man page was wrong. It stated that ERRMAX was 255, which it is not.