From: David Tolpin <dvd@davidashen.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] errstr(2)
Date: Thu, 25 Mar 2004 11:08:22 +0400 [thread overview]
Message-ID: <200403250708.i2P78MpX060659@adat.davidashen.net> (raw)
In-Reply-To: <40628185.4070308@swtch.com>
> >
> >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
next prev parent reply other threads:[~2004-03-25 7:08 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 [this message]
2004-03-25 12:33 ` David Presotto
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=200403250708.i2P78MpX060659@adat.davidashen.net \
--to=dvd@davidashen.net \
--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).