summaryrefslogtreecommitdiffstats
path: root/usr.sbin/cpucontrol/cpucontrol.c
diff options
context:
space:
mode:
authorstas <stas@FreeBSD.org>2008-08-12 09:47:50 +0000
committerstas <stas@FreeBSD.org>2008-08-12 09:47:50 +0000
commiteec64737a22a58ddedbd46ac71661010c8a119ae (patch)
treec2515b37018edc44fa3a5485e623039e529006bc /usr.sbin/cpucontrol/cpucontrol.c
parent72791f9bc1200815a0f4674c7533c9add019613f (diff)
downloadFreeBSD-src-eec64737a22a58ddedbd46ac71661010c8a119ae.zip
FreeBSD-src-eec64737a22a58ddedbd46ac71661010c8a119ae.tar.gz
- Fix error reporting.
Approved by: kib
Diffstat (limited to 'usr.sbin/cpucontrol/cpucontrol.c')
-rw-r--r--usr.sbin/cpucontrol/cpucontrol.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/cpucontrol/cpucontrol.c b/usr.sbin/cpucontrol/cpucontrol.c
index 4736e23..5469ee2 100644
--- a/usr.sbin/cpucontrol/cpucontrol.c
+++ b/usr.sbin/cpucontrol/cpucontrol.c
@@ -146,12 +146,12 @@ do_cpuid(const char *cmdarg, const char *dev)
args.level = level;
fd = open(dev, O_RDONLY);
if (fd < 0) {
- WARNX(0, "error opening %s for reading", dev);
+ WARN(0, "error opening %s for reading", dev);
return (1);
}
error = ioctl(fd, CPUCTL_CPUID, &args);
if (error < 0) {
- WARNX(0, "ioctl(%s, CPUCTL_CPUID)", dev);
+ WARN(0, "ioctl(%s, CPUCTL_CPUID)", dev);
close(fd);
return (error);
}
@@ -198,13 +198,13 @@ do_msr(const char *cmdarg, const char *dev)
args.msr = msr;
fd = open(dev, wr == 0 ? O_RDONLY : O_WRONLY);
if (fd < 0) {
- WARNX(0, "error opening %s for %s", dev,
+ WARN(0, "error opening %s for %s", dev,
wr == 0 ? "reading" : "writing");
return (1);
}
error = ioctl(fd, wr == 0 ? CPUCTL_RDMSR : CPUCTL_WRMSR, &args);
if (error < 0) {
- WARNX(0, "ioctl(%s, %s)", dev,
+ WARN(0, "ioctl(%s, %s)", dev,
wr == 0 ? "CPUCTL_RDMSR" : "CPUCTL_WRMSR");
close(fd);
return (1);
@@ -230,7 +230,7 @@ do_update(const char *dev)
fd = open(dev, O_RDONLY);
if (fd < 0) {
- WARNX(0, "error opening %s for reading", dev);
+ WARN(0, "error opening %s for reading", dev);
return (1);
}
OpenPOWER on IntegriCloud