svn commit: r354697 - head/usr.sbin/cpucontrol

Konstantin Belousov kib at FreeBSD.org
Wed Nov 13 22:43:11 UTC 2019


Author: kib
Date: Wed Nov 13 22:43:11 2019
New Revision: 354697
URL: https://svnweb.freebsd.org/changeset/base/354697

Log:
  cpucontrol: print more useful information when MSR access fails.
  
  Instead of providing ioctl cmd value, which has no meaning to user,
  print MSR number.  The later is what the user expects in this place
  even.
  
  Reported by:	pstef
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 days

Modified:
  head/usr.sbin/cpucontrol/cpucontrol.c

Modified: head/usr.sbin/cpucontrol/cpucontrol.c
==============================================================================
--- head/usr.sbin/cpucontrol/cpucontrol.c	Wed Nov 13 22:39:46 2019	(r354696)
+++ head/usr.sbin/cpucontrol/cpucontrol.c	Wed Nov 13 22:43:11 2019	(r354697)
@@ -307,7 +307,7 @@ do_msr(const char *cmdarg, const char *dev)
 	}
 	error = ioctl(fd, command, &args);
 	if (error < 0) {
-		WARN(0, "ioctl(%s, CPUCTL_%s (%lu))", dev, command_name, command);
+		WARN(0, "ioctl(%s, CPUCTL_%s (%#x))", dev, command_name, msr);
 		close(fd);
 		return (1);
 	}


More information about the svn-src-head mailing list