Support machdep.booted_kernel sysctl.
This commit is contained in:
parent
8f5f11180a
commit
d2f3ad2de2
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.6 2001/03/15 06:10:39 chs Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.7 2001/03/23 11:10:10 toshii Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -106,6 +106,8 @@ int kernel_debug = 0;
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
extern char booted_kernel[];
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit __P((void));
|
||||
@ -724,6 +726,13 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
sizeof consdev));
|
||||
}
|
||||
|
||||
case CPU_BOOTED_KERNEL: {
|
||||
if (booted_kernel != NULL && booted_kernel[0] != '\0')
|
||||
return sysctl_rdstring(oldp, oldlenp, newp,
|
||||
booted_kernel);
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user