Deleted Added
full compact
kern_sysctl.c (167211) kern_sysctl.c (167232)
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 * Quite extensively rewritten by Poul-Henning Kamp of the FreeBSD

--- 22 unchanged lines hidden (view full) ---

31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
36 */
37
38#include <sys/cdefs.h>
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 * Quite extensively rewritten by Poul-Henning Kamp of the FreeBSD

--- 22 unchanged lines hidden (view full) ---

31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
36 */
37
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/sys/kern/kern_sysctl.c 167211 2007-03-04 22:36:48Z rwatson $");
39__FBSDID("$FreeBSD: head/sys/kern/kern_sysctl.c 167232 2007-03-05 13:10:58Z rwatson $");
40
41#include "opt_compat.h"
42#include "opt_mac.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/kernel.h>
47#include <sys/sysctl.h>

--- 1241 unchanged lines hidden (view full) ---

1289 int *name;
1290 u_int namelen;
1291 void *old;
1292 size_t *oldlenp;
1293 void *new;
1294 size_t newlen;
1295};
1296#endif
40
41#include "opt_compat.h"
42#include "opt_mac.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46#include <sys/kernel.h>
47#include <sys/sysctl.h>

--- 1241 unchanged lines hidden (view full) ---

1289 int *name;
1290 u_int namelen;
1291 void *old;
1292 size_t *oldlenp;
1293 void *new;
1294 size_t newlen;
1295};
1296#endif
1297
1298int
1299__sysctl(struct thread *td, struct sysctl_args *uap)
1300{
1301 int error, name[CTL_MAXNAME];
1302 size_t j;
1303
1304 if (uap->namelen > CTL_MAXNAME || uap->namelen < 2)
1305 return (EINVAL);

--- 135 unchanged lines hidden (view full) ---

1441
1442 struct timeval pad16;
1443 /* we dont set this, because BSDI's uname used gethostname() instead */
1444 int bsdi_hostname; /* hostname on BSD/386 */
1445
1446 /* the actual string data is appended here */
1447
1448} bsdi_si;
1297int
1298__sysctl(struct thread *td, struct sysctl_args *uap)
1299{
1300 int error, name[CTL_MAXNAME];
1301 size_t j;
1302
1303 if (uap->namelen > CTL_MAXNAME || uap->namelen < 2)
1304 return (EINVAL);

--- 135 unchanged lines hidden (view full) ---

1440
1441 struct timeval pad16;
1442 /* we dont set this, because BSDI's uname used gethostname() instead */
1443 int bsdi_hostname; /* hostname on BSD/386 */
1444
1445 /* the actual string data is appended here */
1446
1447} bsdi_si;
1448
1449/*
1450 * this data is appended to the end of the bsdi_si structure during copyout.
1451 * The "char *" offsets are relative to the base of the bsdi_si struct.
1452 * This contains "FreeBSD\02.0-BUILT-nnnnnn\0i386\0", and these strings
1453 * should not exceed the length of the buffer here... (or else!! :-)
1454 */
1455static char bsdi_strings[80]; /* It had better be less than this! */
1456
1457#ifndef _SYS_SYSPROTO_H_
1458struct getkerninfo_args {
1459 int op;
1460 char *where;
1461 size_t *size;
1462 int arg;
1463};
1464#endif
1449/*
1450 * this data is appended to the end of the bsdi_si structure during copyout.
1451 * The "char *" offsets are relative to the base of the bsdi_si struct.
1452 * This contains "FreeBSD\02.0-BUILT-nnnnnn\0i386\0", and these strings
1453 * should not exceed the length of the buffer here... (or else!! :-)
1454 */
1455static char bsdi_strings[80]; /* It had better be less than this! */
1456
1457#ifndef _SYS_SYSPROTO_H_
1458struct getkerninfo_args {
1459 int op;
1460 char *where;
1461 size_t *size;
1462 int arg;
1463};
1464#endif
1465
1466int
1467ogetkerninfo(struct thread *td, struct getkerninfo_args *uap)
1468{
1469 int error, name[6];
1470 size_t size;
1471 u_int needed = 0;
1472
1473 mtx_lock(&Giant);

--- 137 unchanged lines hidden ---
1465int
1466ogetkerninfo(struct thread *td, struct getkerninfo_args *uap)
1467{
1468 int error, name[6];
1469 size_t size;
1470 u_int needed = 0;
1471
1472 mtx_lock(&Giant);

--- 137 unchanged lines hidden ---