Deleted Added
full compact
sysctl.c (116383) sysctl.c (121306)
1/*
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93";
43#endif
44static const char rcsid[] =
1/*
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static char sccsid[] = "@(#)from: sysctl.c 8.1 (Berkeley) 6/6/93";
43#endif
44static const char rcsid[] =
45 "$FreeBSD: head/sbin/sysctl/sysctl.c 116383 2003-06-15 06:26:08Z rwatson $";
45 "$FreeBSD: head/sbin/sysctl/sysctl.c 121306 2003-10-21 16:49:30Z silby $";
46#endif /* not lint */
47
48#ifdef __i386__
49#include <sys/reboot.h> /* used for bootdev parsing */
50#endif
51#include <sys/param.h>
52#include <sys/time.h>
53#include <sys/resource.h>

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

192 if (!i && !bflag)
193 putchar('\n');
194 }
195 } else {
196 if ((kind & CTLTYPE) == CTLTYPE_NODE)
197 errx(1, "oid '%s' isn't a leaf node", bufp);
198
199 if (!(kind&CTLFLAG_WR))
46#endif /* not lint */
47
48#ifdef __i386__
49#include <sys/reboot.h> /* used for bootdev parsing */
50#endif
51#include <sys/param.h>
52#include <sys/time.h>
53#include <sys/resource.h>

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

192 if (!i && !bflag)
193 putchar('\n');
194 }
195 } else {
196 if ((kind & CTLTYPE) == CTLTYPE_NODE)
197 errx(1, "oid '%s' isn't a leaf node", bufp);
198
199 if (!(kind&CTLFLAG_WR))
200 errx(1, "oid '%s' is read only", bufp);
200 if (kind & CTLFLAG_TUN) {
201 fprintf(stderr, "Tunable values are set in /boot/loader.conf and require a reboot to take effect.\n");
202 errx(1, "oid '%s' is a tunable.", bufp);
203 } else {
204 errx(1, "oid '%s' is read only", bufp);
205 }
201
202 if ((kind & CTLTYPE) == CTLTYPE_INT ||
203 (kind & CTLTYPE) == CTLTYPE_UINT ||
204 (kind & CTLTYPE) == CTLTYPE_LONG ||
205 (kind & CTLTYPE) == CTLTYPE_ULONG) {
206 if (strlen(newval) == 0)
207 errx(1, "empty numeric value");
208 }

--- 455 unchanged lines hidden ---
206
207 if ((kind & CTLTYPE) == CTLTYPE_INT ||
208 (kind & CTLTYPE) == CTLTYPE_UINT ||
209 (kind & CTLTYPE) == CTLTYPE_LONG ||
210 (kind & CTLTYPE) == CTLTYPE_ULONG) {
211 if (strlen(newval) == 0)
212 errx(1, "empty numeric value");
213 }

--- 455 unchanged lines hidden ---