mirror of
https://github.com/systemd/systemd.git
synced 2024-11-24 02:33:36 +08:00
load-fragment: parse specifiers in CPUAffinity= (#19281)
This commit is contained in:
parent
7c5fd25119
commit
54cfe9a75f
@ -1698,6 +1698,8 @@ int config_parse_exec_cpu_affinity(
|
||||
void *userdata) {
|
||||
|
||||
ExecContext *c = data;
|
||||
const Unit *u = userdata;
|
||||
_cleanup_free_ char *k = NULL;
|
||||
int r;
|
||||
|
||||
assert(filename);
|
||||
@ -1712,7 +1714,15 @@ int config_parse_exec_cpu_affinity(
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = parse_cpu_set_extend(rvalue, &c->cpu_set, true, unit, filename, line, lvalue);
|
||||
r = unit_full_printf(u, rvalue, &k);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Failed to resolve unit specifiers in '%s', ignoring: %m",
|
||||
rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
r = parse_cpu_set_extend(k, &c->cpu_set, true, unit, filename, line, lvalue);
|
||||
if (r >= 0)
|
||||
c->cpu_affinity_from_numa = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user