diff options
author | Heiko Carstens | 2011-08-15 07:52:44 +0200 |
---|---|---|
committer | Heiko Carstens | 2011-08-15 07:52:44 +0200 |
commit | b16f615afb8339b46e343e5dc292d1090ebff807 (patch) | |
tree | 6668ad4107b01765c9251fb9aaa6aec53dea3ee0 /schedutils | |
parent | ipcs: use unsigned type for uid/gid (diff) | |
download | kernel-qcow2-util-linux-b16f615afb8339b46e343e5dc292d1090ebff807.tar.gz kernel-qcow2-util-linux-b16f615afb8339b46e343e5dc292d1090ebff807.tar.xz kernel-qcow2-util-linux-b16f615afb8339b46e343e5dc292d1090ebff807.zip |
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>
Diffstat (limited to 'schedutils')
-rw-r--r-- | schedutils/taskset.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/schedutils/taskset.c b/schedutils/taskset.c index 1457c651d..085675d7a 100644 --- a/schedutils/taskset.c +++ b/schedutils/taskset.c @@ -208,7 +208,7 @@ int main(int argc, char **argv) ts.get_only = 1; else if (ts.use_list) { - if (cpulist_parse(argv[optind], new_set, new_setsize)) + if (cpulist_parse(argv[optind], new_set, new_setsize, 0)) errx(EXIT_FAILURE, _("failed to parse CPU list: %s"), argv[optind]); } else if (cpumask_parse(argv[optind], new_set, new_setsize)) { |