aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1994-09-24 00:10:13 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1994-09-24 00:10:13 +0000
commita2647fcdec4cbd44271698ef6927787012e03ad0 (patch)
tree08dc735b81084fc18c9cdbfa20c5d274cbde0b83
parent4be4929c2b4d34e3b3fe776a16b448b428012e5d (diff)
downloadsrc-a2647fcdec4cbd44271698ef6927787012e03ad0.tar.gz
src-a2647fcdec4cbd44271698ef6927787012e03ad0.zip
If sysctl() fails, return "/kernel" so as not to screw people who haven't
updated their kernels yet.
Notes
Notes: svn path=/head/; revision=3042
-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 909b5f187f0a..3d038514051e 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);
}