svn commit: r222195 - projects/largeSMP/sys/kern
Attilio Rao
attilio at FreeBSD.org
Sun May 22 20:29:48 UTC 2011
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);
}
More information about the svn-src-projects
mailing list