diff options
Diffstat (limited to 'usr.sbin/cpucontrol/intel.c')
-rw-r--r-- | usr.sbin/cpucontrol/intel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/cpucontrol/intel.c b/usr.sbin/cpucontrol/intel.c index 15ac939..96ab704 100644 --- a/usr.sbin/cpucontrol/intel.c +++ b/usr.sbin/cpucontrol/intel.c @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include <unistd.h> #include <fcntl.h> #include <err.h> +#include <errno.h> #include <sys/types.h> #include <sys/stat.h> @@ -266,7 +267,9 @@ matched: args.size = data_size; error = ioctl(devfd, CPUCTL_UPDATE, &args); if (error < 0) { + error = errno; fprintf(stderr, "failed.\n"); + errno = error; WARN(0, "ioctl()"); goto fail; } |