svn commit: r217119 - head/usr.sbin/cpucontrol
Stanislav Sedov
stas at FreeBSD.org
Fri Jan 7 18:52:09 UTC 2011
Author: stas
Date: Fri Jan 7 18:52:08 2011
New Revision: 217119
URL: http://svn.freebsd.org/changeset/base/217119
Log:
- Save some space relying on the fact that all ioctl commands
prefixes are the same.
Suggested by: "Carlos A. M. dos Santos" <unixmania at gmail.com>
Modified:
head/usr.sbin/cpucontrol/cpucontrol.c
Modified: head/usr.sbin/cpucontrol/cpucontrol.c
==============================================================================
--- head/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 7 18:41:59 2011 (r217118)
+++ head/usr.sbin/cpucontrol/cpucontrol.c Fri Jan 7 18:52:08 2011 (r217119)
@@ -246,19 +246,19 @@ do_msr(const char *cmdarg, const char *d
switch (op) {
case OP_READ:
command = CPUCTL_RDMSR;
- command_name = "CPUCTL_RDMSR";
+ command_name = "RDMSR";
break;
case OP_WRITE:
command = CPUCTL_WRMSR;
- command_name = "CPUCTL_WRMSR";
+ command_name = "WRMSR";
break;
case OP_OR:
command = CPUCTL_MSRSBIT;
- command_name = "CPUCTL_MSRSBIT";
+ command_name = "MSRSBIT";
break;
case OP_AND:
command = CPUCTL_MSRCBIT;
- command_name = "CPUCTL_MSRCBIT";
+ command_name = "MSRCBIT";
break;
default:
abort();
@@ -271,7 +271,7 @@ do_msr(const char *cmdarg, const char *d
}
error = ioctl(fd, command, &args);
if (error < 0) {
- WARN(0, "ioctl(%s, %s (%lu))", dev, command_name, command);
+ WARN(0, "ioctl(%s, CPUCTL_%s (%lu))", dev, command_name, command);
close(fd);
return (1);
}
More information about the svn-src-head
mailing list