Subject: Re: gethostname and getdomainname
To: Ignatios Souvatzis <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 11/14/1999 16:50:48
On Nov 14, 10:01pm, firstname.lastname@example.org (Ignatios Souvatzis) wrote:
-- Subject: Re: gethostname and getdomainname
| Content-Type: text/plain; charset=us-ascii
| On Sun, Nov 14, 1999 at 09:29:10PM +0100, Ignatios Souvatzis wrote:
| > I really think we should also swallow the error there.
| > > I still think though that it is better
| > > to make sysctl return a non-null-terminated string.
| > Thats fine with me.
| > To summarize, I would
| > - fix sysctl so that it returns the truncated string, non-null-terminated,
| > and create an appropriate error. I think copyoutstr will do the job nicely
| > for us.
| Didn't need to. First, it returns an errno not documented in sysctl(3), 2nd,
| I need to explictly get at the length anyhow (for passing it back), so it
| can use copyout, like before.
| Here's the kern_sysctl.c patch for review:
Looks fine to me. I still think gethostname() should return an error
if it truncates. How else will you know if it did truncate?