diff options
author | Juli Mallett <jmallett@FreeBSD.org> | 2003-07-01 20:15:28 +0000 |
---|---|---|
committer | Juli Mallett <jmallett@FreeBSD.org> | 2003-07-01 20:15:28 +0000 |
commit | e7b883c427297e23d68c18fb70a00d277f3d7997 (patch) | |
tree | 82973e839b3c1811f45d07b404b7dad42395f641 /usr.bin/uname | |
parent | 331e0123962baa0a2382232e66e3d2b5e3932981 (diff) | |
download | src-test2-e7b883c427297e23d68c18fb70a00d277f3d7997.tar.gz src-test2-e7b883c427297e23d68c18fb70a00d277f3d7997.zip |
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.
Notes
Notes:
svn path=/head/; revision=117137
Diffstat (limited to 'usr.bin/uname')
-rw-r--r-- | usr.bin/uname/uname.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/uname/uname.c b/usr.bin/uname/uname.c index d4642ffdf8e0..81aef452a74e 100644 --- a/usr.bin/uname/uname.c +++ b/usr.bin/uname/uname.c @@ -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"); |