Author: ae
Date: Fri Oct  9 11:24:19 2020
New Revision: 366568
URL: https://svnweb.freebsd.org/changeset/base/366568

Log:
  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

Modified:
  head/usr.bin/cpuset/cpuset.c

Modified: head/usr.bin/cpuset/cpuset.c
==============================================================================
--- head/usr.bin/cpuset/cpuset.c        Fri Oct  9 10:55:19 2020        
(r366567)
+++ head/usr.bin/cpuset/cpuset.c        Fri Oct  9 11:24:19 2020        
(r366568)
@@ -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)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to