- Save some space relying on the fact that all ioctl commands

prefixes are the same.

Suggested by:	"Carlos A. M. dos Santos" <unixmania@gmail.com>
This commit is contained in:
Stanislav Sedov 2011-01-07 18:52:08 +00:00
parent 750647ad62
commit 3b232eb663
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217119

View File

@ -246,19 +246,19 @@ do_msr(const char *cmdarg, const char *dev)
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 *dev)
}
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);
}