Make the sysctlbyname stuff look like the 2-level MIB stuff. This

means actually setting 'len', for example.  Which will make uname -i
work on some systems where it did not.  Anywhere where it did work,
it was a matter of coincidence.

Submitted by:	redpixel on EFnet.
This commit is contained in:
Juli Mallett 2003-07-01 20:15:28 +00:00
parent 331e012396
commit e7b883c427
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117137

View File

@ -199,6 +199,7 @@ native_##var(void) \
static char buf[1024]; \
char **varp = &(var); \
\
len = sizeof buf; \
if (sysctlbyname(name, &buf, &len, NULL,\
0) == -1) \
err(1, "sysctlbyname");