summaryrefslogtreecommitdiff
path: root/pkgtools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgtools')
-rw-r--r--pkgtools/libkver/Makefile4
-rw-r--r--pkgtools/libkver/files/lib/kver.c12
2 files changed, 6 insertions, 10 deletions
diff --git a/pkgtools/libkver/Makefile b/pkgtools/libkver/Makefile
index 6c4a57394e3..e6406b4cf27 100644
--- a/pkgtools/libkver/Makefile
+++ b/pkgtools/libkver/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2004/01/19 13:38:28 jmmv Exp $
+# $NetBSD: Makefile,v 1.11 2004/07/06 09:45:38 cube Exp $
DISTNAME= libkver-${VERSION}
CATEGORIES= pkgtools
@@ -18,7 +18,7 @@ NO_PKGTOOLS_REQD_CHECK= # defined
NO_CHECKSUM= # defined
NO_MTREE= # defined
-VERSION= 0.4
+VERSION= 0.5
ONLY_FOR_PLATFORM= NetBSD-*-*
diff --git a/pkgtools/libkver/files/lib/kver.c b/pkgtools/libkver/files/lib/kver.c
index 9e16d8e2fda..cf4354b0f31 100644
--- a/pkgtools/libkver/files/lib/kver.c
+++ b/pkgtools/libkver/files/lib/kver.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kver.c,v 1.4 2003/12/13 17:45:59 seb Exp $ */
+/* $NetBSD: kver.c,v 1.5 2004/07/06 09:45:38 cube Exp $ */
#include <sys/types.h>
#include <sys/param.h>
@@ -157,15 +157,11 @@ sysctl(int *name, u_int namelen, void *oldp, size_t * oldlenp, const void *newp,
if (newp != (void *) NULL)
goto real;
- if (namelen != 2) {
- errno = EINVAL;
- return (-1);
- }
if (KVER_NOT_INITIALIZED)
kver_initialize();
- if (KVER_BADLY_INITIALIZED)
- return -1;
+ if (KVER_BADLY_INITIALIZED || namelen != 2)
+ goto real;
if (name[0] == CTL_KERN) {
size_t len;
@@ -201,7 +197,7 @@ uname(struct utsname * n)
kver_initialize();
if (KVER_BADLY_INITIALIZED)
- return -1;
+ return _uname(n);
(void) strncpy(n->sysname, real_utsname.sysname, _SYS_NMLN);
(void) strncpy(n->nodename, real_utsname.nodename, _SYS_NMLN);