summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-09-24 00:10:13 +0000
committerwollman <wollman@FreeBSD.org>1994-09-24 00:10:13 +0000
commita39c6d05053f6f5f3a493cd4c4835695f64d4ec8 (patch)
tree08dc735b81084fc18c9cdbfa20c5d274cbde0b83 /lib
parent193a8fae68d5a51a2dad17c0ee77db1a6d60cb98 (diff)
downloadFreeBSD-src-a39c6d05053f6f5f3a493cd4c4835695f64d4ec8.zip
FreeBSD-src-a39c6d05053f6f5f3a493cd4c4835695f64d4ec8.tar.gz
If sysctl() fails, return "/kernel" so as not to screw people who haven't
updated their kernels yet.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/getbootfile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/getbootfile.c b/lib/libc/gen/getbootfile.c
index 909b5f1..3d03851 100644
--- a/lib/libc/gen/getbootfile.c
+++ b/lib/libc/gen/getbootfile.c
@@ -34,7 +34,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char sccsid[] = "From: @(#)gethostname.c 8.1 (Berkeley) 6/4/93";*/
static const char rcsid[] =
- "$Id$";
+ "$Id: getbootfile.c,v 1.1 1994/09/23 20:22:01 wollman Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -50,6 +50,6 @@ getbootfile(void)
mib[0] = CTL_KERN;
mib[1] = KERN_BOOTFILE;
if (sysctl(mib, 2, name, &size, NULL, 0) == -1)
- return (0);
+ return ("/kernel");
return (name);
}
OpenPOWER on IntegriCloud