]> git.ipfire.org Git - thirdparty/util-linux.git/commit
cpuset: add option to allow cpulist_parse() to fail
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 15 Aug 2011 05:52:44 +0000 (07:52 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 15 Aug 2011 05:52:44 +0000 (07:52 +0200)
commitb16f615afb8339b46e343e5dc292d1090ebff807
tree6668ad4107b01765c9251fb9aaa6aec53dea3ee0
parent344f73442d3a45db5927c049eef1ed8cf5d13934
cpuset: add option to allow cpulist_parse() to fail

This is a preparation patch for chcpu. If a cpu should be added to
a cpu_set where the cpu doesn't fit into the cpu_set this got silently
ignored.
Since the cpu-list is user space provided it should be checked if cpus
are specified that are completely out of range of the system.
In order to do that add a parameter which specifies if cpulist_parse()
should fail if it parses a cpu-list with "impossible" cpus.
The current callers have been converted so they behave like before.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
include/cpuset.h
lib/cpuset.c
schedutils/taskset.c
sys-utils/lscpu.c