From owner-svn-src-projects@FreeBSD.ORG Sun May 22 20:29:48 2011 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DFE7106564A; Sun, 22 May 2011 20:29:48 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F6228FC21; Sun, 22 May 2011 20:29:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4MKTmIm089329; Sun, 22 May 2011 20:29:48 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4MKTmog089327; Sun, 22 May 2011 20:29:48 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201105222029.p4MKTmog089327@svn.freebsd.org> From: Attilio Rao Date: Sun, 22 May 2011 20:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r222195 - projects/largeSMP/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 May 2011 20:29:48 -0000 Author: attilio Date: Sun May 22 20:29:47 2011 New Revision: 222195 URL: http://svn.freebsd.org/changeset/base/222195 Log: Make cpusetobj_strprint() prepare the string in order to print the least significant cpuset_t word at the outmost right part of the string (more far from the beginning of it). This follows the natural build of bits rappresentation in the words. Modified: projects/largeSMP/sys/kern/kern_cpuset.c Modified: projects/largeSMP/sys/kern/kern_cpuset.c ============================================================================== --- projects/largeSMP/sys/kern/kern_cpuset.c Sun May 22 20:24:36 2011 (r222194) +++ projects/largeSMP/sys/kern/kern_cpuset.c Sun May 22 20:29:47 2011 (r222195) @@ -650,12 +650,12 @@ cpusetobj_strprint(char *buf, const cpus bytesp = 0; bufsiz = CPUSETBUFSIZ; - for (i = 0; i < (_NCPUWORDS - 1); i++) { + for (i = _NCPUWORDS - 1; i > 0; i--) { bytesp = snprintf(tbuf, bufsiz, "%lx, ", set->__bits[i]); bufsiz -= bytesp; tbuf += bytesp; } - snprintf(tbuf, bufsiz, "%lx", set->__bits[_NCPUWORDS - 1]); + snprintf(tbuf, bufsiz, "%lx", set->__bits[0]); return (buf); }