Deleted Added
full compact
cpucontrol.c (201145) cpucontrol.c (201227)
1/*-
2 * Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
3 * 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

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

24 */
25
26/*
27 * This utility provides userland access to the cpuctl(4) pseudo-device
28 * features.
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Stanislav Sedov <stas@FreeBSD.org>.
3 * 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

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

24 */
25
26/*
27 * This utility provides userland access to the cpuctl(4) pseudo-device
28 * features.
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/usr.sbin/cpucontrol/cpucontrol.c 201145 2009-12-28 22:56:30Z antoine $");
32__FBSDID("$FreeBSD: head/usr.sbin/cpucontrol/cpucontrol.c 201227 2009-12-29 22:53:27Z ed $");
33
34#include <assert.h>
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>
38#include <unistd.h>
39#include <fcntl.h>
40#include <err.h>

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

97static void usage(void);
98static int isdir(const char *path);
99static int do_cpuid(const char *cmdarg, const char *dev);
100static int do_msr(const char *cmdarg, const char *dev);
101static int do_update(const char *dev);
102static void datadir_add(const char *path);
103
104static void __dead2
33
34#include <assert.h>
35#include <stdio.h>
36#include <stdlib.h>
37#include <string.h>
38#include <unistd.h>
39#include <fcntl.h>
40#include <err.h>

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

97static void usage(void);
98static int isdir(const char *path);
99static int do_cpuid(const char *cmdarg, const char *dev);
100static int do_msr(const char *cmdarg, const char *dev);
101static int do_update(const char *dev);
102static void datadir_add(const char *path);
103
104static void __dead2
105usage()
105usage(void)
106{
107 const char *name;
108
109 name = getprogname();
110 if (name == NULL)
111 name = "cpuctl";
112 fprintf(stderr, "Usage: %s [-vh] [-d datadir] [-m msr[=value] | "
113 "-i level | -u] device\n", name);

--- 310 unchanged lines hidden ---
106{
107 const char *name;
108
109 name = getprogname();
110 if (name == NULL)
111 name = "cpuctl";
112 fprintf(stderr, "Usage: %s [-vh] [-d datadir] [-m msr[=value] | "
113 "-i level | -u] device\n", name);

--- 310 unchanged lines hidden ---