9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: David Presotto <presotto@closedmind.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] errstr(2)
Date: Thu, 25 Mar 2004 07:33:15 -0500	[thread overview]
Message-ID: <c0c143e0363c0b64838f51dd98c64c8e@plan9.bell-labs.com> (raw)
In-Reply-To: <200403250708.i2P78MpX060659@adat.davidashen.net>

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.


  reply	other threads:[~2004-03-25 12:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-25  6:43 David Tolpin
2004-03-25  6:51 ` Russ Cox
2004-03-25  7:08   ` David Tolpin
2004-03-25 12:33     ` David Presotto [this message]
2004-03-25 12:39       ` David Tolpin
2004-03-25 12:52         ` David Presotto
2004-03-25 12:57           ` lucio
2004-03-25 13:30           ` David Tolpin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0c143e0363c0b64838f51dd98c64c8e@plan9.bell-labs.com \
    --to=presotto@closedmind.org \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).