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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user