diff options
author | attilio <attilio@FreeBSD.org> | 2011-05-22 20:29:47 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-05-22 20:29:47 +0000 |
commit | 08bcb681d2e1e3a0707624ad288cb81cd79bed89 (patch) | |
tree | d7e926f71836c537755dfe60a2bfc39dcebd96c1 /sys/kern/kern_cpuset.c | |
parent | 750009665bbebcbb1a091fddb3e27507a3bc3ab7 (diff) | |
download | FreeBSD-src-08bcb681d2e1e3a0707624ad288cb81cd79bed89.zip FreeBSD-src-08bcb681d2e1e3a0707624ad288cb81cd79bed89.tar.gz |
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.
Diffstat (limited to 'sys/kern/kern_cpuset.c')
-rw-r--r-- | sys/kern/kern_cpuset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 5d058e6..3b2c653 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -650,12 +650,12 @@ cpusetobj_strprint(char *buf, const cpuset_t *set) 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); } |