From 78824aa6c6213abdfaf3e50d4d624b446534d6b1 Mon Sep 17 00:00:00 2001 From: ae Date: Fri, 9 Oct 2020 11:24:19 +0000 Subject: [PATCH] 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 --- usr.bin/cpuset/cpuset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)