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.
This commit is contained in:
parent
d30e0db53a
commit
34a1e065bd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/largeSMP/; revision=222195
@ -650,12 +650,12 @@ cpusetobj_strprint(char *buf, const cpuset_t *set)
|
|||||||
bytesp = 0;
|
bytesp = 0;
|
||||||
bufsiz = CPUSETBUFSIZ;
|
bufsiz = CPUSETBUFSIZ;
|
||||||
|
|
||||||
for (i = 0; i < (_NCPUWORDS - 1); i++) {
|
for (i = _NCPUWORDS - 1; i > 0; i--) {
|
||||||
bytesp = snprintf(tbuf, bufsiz, "%lx, ", set->__bits[i]);
|
bytesp = snprintf(tbuf, bufsiz, "%lx, ", set->__bits[i]);
|
||||||
bufsiz -= bytesp;
|
bufsiz -= bytesp;
|
||||||
tbuf += bytesp;
|
tbuf += bytesp;
|
||||||
}
|
}
|
||||||
snprintf(tbuf, bufsiz, "%lx", set->__bits[_NCPUWORDS - 1]);
|
snprintf(tbuf, bufsiz, "%lx", set->__bits[0]);
|
||||||
return (buf);
|
return (buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user