Deleted Added
full compact
kern_sysctl.c (12279) kern_sysctl.c (12280)
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.40 1995/11/14 09:05:40 phk Exp $
37 * $Id: kern_sysctl.c,v 1.41 1995/11/14 09:07:14 phk Exp $
38 */
39
40/*
41 * sysctl system call.
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>

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

265 sysctl_sysctl_debug_dump_node(&sysctl_, 0);
266 return ENOENT;
267}
268
269SYSCTL_PROC(_sysctl, 0, debug, CTLTYPE_STRING|CTLFLAG_RD,
270 0, 0, sysctl_sysctl_debug, "");
271
272char domainname[MAXHOSTNAMELEN];
38 */
39
40/*
41 * sysctl system call.
42 */
43
44#include <sys/param.h>
45#include <sys/systm.h>

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

265 sysctl_sysctl_debug_dump_node(&sysctl_, 0);
266 return ENOENT;
267}
268
269SYSCTL_PROC(_sysctl, 0, debug, CTLTYPE_STRING|CTLFLAG_RD,
270 0, 0, sysctl_sysctl_debug, "");
271
272char domainname[MAXHOSTNAMELEN];
273int domainnamelen;
274static int
275sysctl_kern_domainname SYSCTL_HANDLER_ARGS
276{
277 int error = sysctl_handle_string(oidp,
278 oidp->oid_arg1, oidp->oid_arg2, req);
279 if (req->newptr && (error == 0 || error == ENOMEM))
280 domainnamelen = req->newlen;
281 return error;
282}
273SYSCTL_STRING(_kern, KERN_DOMAINNAME, domainname, CTLFLAG_RW,
274 &domainname, sizeof(domainname), "");
283
275
284SYSCTL_PROC(_kern, KERN_DOMAINNAME, domainname, CTLTYPE_STRING|CTLFLAG_RW,
285 &domainname, sizeof(domainname), sysctl_kern_domainname, "");
286
287long hostid;
288/* Some trouble here, if sizeof (int) != sizeof (long) */
289SYSCTL_INT(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "");
290
291/*
292 * Handle an integer, signed or unsigned.
293 * Two cases:
294 * a variable: point arg1 at it.

--- 898 unchanged lines hidden ---
276long hostid;
277/* Some trouble here, if sizeof (int) != sizeof (long) */
278SYSCTL_INT(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "");
279
280/*
281 * Handle an integer, signed or unsigned.
282 * Two cases:
283 * a variable: point arg1 at it.

--- 898 unchanged lines hidden ---