kern_sysctl.c (2004) | kern_sysctl.c (2112) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Karels at Berkeley Software Design, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Karels at Berkeley Software Design, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 |
37 * $Id: kern_sysctl.c,v 1.5 1994/08/08 15:40:58 wollman Exp $ | 37 * $Id: kern_sysctl.c,v 1.7 1994/08/10 06:25:02 wollman Exp $ |
38 */ 39 40/* 41 * sysctl system call. 42 */ 43 44#include <sys/param.h> 45#include <sys/systm.h> --- 147 unchanged lines hidden (view full) --- 193 u_int namelen; 194 void *oldp; 195 size_t *oldlenp; 196 void *newp; 197 size_t newlen; 198 struct proc *p; 199{ 200 int error, level, inthostid; | 38 */ 39 40/* 41 * sysctl system call. 42 */ 43 44#include <sys/param.h> 45#include <sys/systm.h> --- 147 unchanged lines hidden (view full) --- 193 u_int namelen; 194 void *oldp; 195 size_t *oldlenp; 196 void *newp; 197 size_t newlen; 198 struct proc *p; 199{ 200 int error, level, inthostid; |
201 extern char ostype[], osrelease[], version[]; | 201 extern char ostype[], osrelease[]; |
202 203 /* all sysctl names at this level are terminal */ 204 if (namelen != 1 && !(name[0] == KERN_PROC || name[0] == KERN_PROF)) 205 return (ENOTDIR); /* overloaded */ 206 207 switch (name[0]) { 208 case KERN_OSTYPE: 209 return (sysctl_rdstring(oldp, oldlenp, newp, ostype)); --- 615 unchanged lines hidden --- | 202 203 /* all sysctl names at this level are terminal */ 204 if (namelen != 1 && !(name[0] == KERN_PROC || name[0] == KERN_PROF)) 205 return (ENOTDIR); /* overloaded */ 206 207 switch (name[0]) { 208 case KERN_OSTYPE: 209 return (sysctl_rdstring(oldp, oldlenp, newp, ostype)); --- 615 unchanged lines hidden --- |