From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Tolpin Message-Id: <200403250708.i2P78MpX060659@adat.davidashen.net> To: 9fans@cse.psu.edu Subject: Re: [9fans] errstr(2) In-Reply-To: <40628185.4070308@swtch.com> Date: Thu, 25 Mar 2004 11:08:22 +0400 Topicbox-Message-UUID: 4091a904-eacd-11e9-9e20-41e7f4b1d025 > > > >is ERRMAX the 'official' limit on the length of the buffer filled by > >errstr? > > > > > > there is no official limit. that's why you pass your > own limit to the kernel. ERRMAX is what the kernel > is likely to keep around, but it's okay for user and kernel > to disagree. 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. David