diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-07-04 16:44:58 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-07-04 16:44:58 +0200 |
commit | 82c121a4754a9d405b07c75796e329942af2ccc5 (patch) | |
tree | cb80da758516904383e2558b0cc626f0033e5a6e /src/load-fragment.c | |
parent | d264aa332a016501ae164a4316f0acc7da0636f4 (diff) |
dbus: complete exec coverage
Diffstat (limited to 'src/load-fragment.c')
-rw-r--r-- | src/load-fragment.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/load-fragment.c b/src/load-fragment.c index e5c7ba24ab..a5ea0e41b0 100644 --- a/src/load-fragment.c +++ b/src/load-fragment.c @@ -725,19 +725,21 @@ static int config_parse_cpu_affinity( if (!(t = strndup(w, l))) return -ENOMEM; + if (!(c->cpuset)) + if (!(c->cpuset = cpu_set_malloc(&c->cpuset_ncpus))) + return -ENOMEM; + r = safe_atou(t, &cpu); free(t); - if (r < 0 || cpu >= CPU_SETSIZE) { + if (r < 0 || cpu >= c->cpuset_ncpus) { log_error("[%s:%u] Failed to parse CPU affinity: %s", filename, line, rvalue); return -EBADMSG; } - CPU_SET(cpu, &c->cpu_affinity); + CPU_SET_S(cpu, CPU_ALLOC_SIZE(c->cpuset_ncpus), c->cpuset); } - c->cpu_affinity_set = true; - return 0; } |