Subject: Re: gethostname and getdomainname
To: Ignatios Souvatzis <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 11/17/1999 18:07:07
On Nov 17, 11:36pm, firstname.lastname@example.org (Ignatios Souvatzis) wrote:
-- Subject: Re: gethostname and getdomainname
| here is my new kern_sysctl.c diff for review.
| I'm running a kernel with this right now, so it can't be too bad.
| To summarize, changes from old:
| - strings handled by the common functions sysctl_string() and sysctl_rdstring()
| are handled as arrays; that is, a truncated old value is returned, alongside
| with ENOMEM, if the buffer is too small.
| - in all int, quad, and single struct cases, and all specials handled inside
| this file, oldlenp semantics are now as documented in the manual page, that
| is, a NULL oldp, but non-NULL oldlenp returns the needed size
| [I had to change the oldlenp handling, so I thought I should make it as
| advertized. Formerly, the subroutines would not know when a NULL oldlenp
| was passed, do the work anyway, and the value would be thrown away.]
Two minor nits:
- rename koldlenp to oldlenp because it does not refer only
to kernel memory
- put all the SYSCTL_ macros in one place...
Other than that, looks fine to me; commit it.