tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: return value of sysctlbyname(3)



Hi,

On Tue, Aug 19, 2008 at 10:05 PM, Ilya Dogolazky
<ilya.dogolazky%teleca.fi@localhost> wrote:
> Hi,
>
> I have a simple question: what is the return value of the function
> sysctlbyname?
>
> The manual page sysctlbyname(3) states:
>
> "RETURN VALUES
>     If the call to sysctl is successful, the number of bytes copied out is
>     returned.  Otherwise -1 is returned and errno is set appropriately."

From looking at lib/libc/gen/systrl.c and sysctlbyname.c,
it seems that sysctl and sysctlbyname returns 0 on success.


-- 
Hiroshi SAKURAI
http://assam-at-night.blogspot.com/


Home | Main Index | Thread Index | Old Index