Date: Sun, 22 May 2011 20:29:48 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r222195 - projects/largeSMP/sys/kern Message-ID: <201105222029.p4MKTmog089327@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105222029.p4MKTmog089327>