diff options
author | Andrey V. Elsukov <ae@FreeBSD.org> | 2020-10-09 11:24:19 +0000 |
---|---|---|
committer | Andrey V. Elsukov <ae@FreeBSD.org> | 2020-10-09 11:24:19 +0000 |
commit | 39aff95fe2bc0590ef15ba5c71bf16031f0246c0 (patch) | |
tree | 69f0e09359ab04a32f909bce53ff3ddbb84fe74d /usr.bin/cpuset | |
parent | 5432120028ea76c9647c12733baeebb5f18e4634 (diff) | |
download | src-39aff95fe2bc0590ef15ba5c71bf16031f0246c0.tar.gz src-39aff95fe2bc0590ef15ba5c71bf16031f0246c0.zip |
Fix EINVAL message when CPU binding information is requested for IRQ.
`cpuset -g -x N` along with requested information always prints
message `cpuset: getdomain: Invalid argument'. The EINVAL is returned
from kern_cpuset_getdomain(), since it doesn't expect CPU_LEVEL_WHICH
and CPU_WHICH_IRQ parameters.
To fix the error, do not call cpuset_getdomain() when `-x' is specified.
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=366568
Diffstat (limited to 'usr.bin/cpuset')
-rw-r--r-- | usr.bin/cpuset/cpuset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/cpuset/cpuset.c b/usr.bin/cpuset/cpuset.c index b5f674f0d6b2..e039030415bb 100644 --- a/usr.bin/cpuset/cpuset.c +++ b/usr.bin/cpuset/cpuset.c @@ -253,7 +253,7 @@ printaffinity(void) printf("%s %jd%s mask: ", whichnames[which], (intmax_t)id, levelnames[level]); printset((struct bitset *)&mask, CPU_SETSIZE); - if (dflag) + if (dflag || xflag) goto out; if (cpuset_getdomain(level, which, id, sizeof(domain), &domain, &policy) != 0) |