From owner-svn-src-head@FreeBSD.ORG Fri Jan 7 18:52:09 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 527C41065673; Fri, 7 Jan 2011 18:52:09 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4221F8FC18; Fri, 7 Jan 2011 18:52:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p07Iq9C0062151; Fri, 7 Jan 2011 18:52:09 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p07Iq92H062149; Fri, 7 Jan 2011 18:52:09 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <201101071852.p07Iq92H062149@svn.freebsd.org> From: Stanislav Sedov Date: Fri, 7 Jan 2011 18:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217119 - head/usr.sbin/cpucontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2011 18:52:09 -0000 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" 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); }