From 4fc66acb93d6f0002263e2dfaefa46e272ae0c9c Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Fri, 25 Sep 2015 04:45:22 -0700 Subject: cpu-set-util: Accept commas as separators in parse_cpu_set_and_warn Tested CPUAffinity settings on both a service unit and in system.conf and confirmed they work as expected. Added a new test to confirm that trailing commas and spaces work and to prevent any regressions in that area. --- src/basic/cpu-set-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/basic') diff --git a/src/basic/cpu-set-util.c b/src/basic/cpu-set-util.c index 9122ea5d48..441144d5cc 100644 --- a/src/basic/cpu-set-util.c +++ b/src/basic/cpu-set-util.c @@ -75,7 +75,7 @@ int parse_cpu_set_and_warn( unsigned cpu; int r; - r = extract_first_word(&rvalue, &word, WHITESPACE, EXTRACT_QUOTES); + r = extract_first_word(&rvalue, &word, WHITESPACE ",", EXTRACT_QUOTES); if (r < 0) { log_syntax(unit, LOG_ERR, filename, line, r, "Invalid value for %s: %s", lvalue, whole_rvalue); return r; -- cgit v1.2.3-54-g00ecf