Deleted Added
full compact
powerd.c (170682) powerd.c (176380)
1/*-
2 * Copyright (c) 2004 Colin Percival
3 * Copyright (c) 2005 Nate Lawson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted providing that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2004 Colin Percival
3 * Copyright (c) 2005 Nate Lawson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted providing that the following conditions
8 * are met:

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

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 * POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/usr.sbin/powerd/powerd.c 170682 2007-06-13 19:05:11Z marck $");
29__FBSDID("$FreeBSD: head/usr.sbin/powerd/powerd.c 176380 2008-02-18 03:19:25Z kevlo $");
30
31#include <sys/param.h>
32#include <sys/ioctl.h>
33#include <sys/sysctl.h>
34#include <sys/resource.h>
35#include <sys/socket.h>
36#include <sys/time.h>
37#include <sys/un.h>

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

382 poll_ival = DEFAULT_POLL_INTERVAL;
383 mjoules_used = 0;
384 vflag = 0;
385
386 /* User must be root to control frequencies. */
387 if (geteuid() != 0)
388 errx(1, "must be root to run");
389
30
31#include <sys/param.h>
32#include <sys/ioctl.h>
33#include <sys/sysctl.h>
34#include <sys/resource.h>
35#include <sys/socket.h>
36#include <sys/time.h>
37#include <sys/un.h>

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

382 poll_ival = DEFAULT_POLL_INTERVAL;
383 mjoules_used = 0;
384 vflag = 0;
385
386 /* User must be root to control frequencies. */
387 if (geteuid() != 0)
388 errx(1, "must be root to run");
389
390 while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:v")) != EOF)
390 while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:v")) != -1)
391 switch (ch) {
392 case 'a':
393 parse_mode(optarg, &mode_ac, ch);
394 break;
395 case 'b':
396 parse_mode(optarg, &mode_battery, ch);
397 break;
398 case 'i':

--- 230 unchanged lines hidden ---
391 switch (ch) {
392 case 'a':
393 parse_mode(optarg, &mode_ac, ch);
394 break;
395 case 'b':
396 parse_mode(optarg, &mode_battery, ch);
397 break;
398 case 'i':

--- 230 unchanged lines hidden ---