diff options
author | Filipe Brandenburger <filbranden@google.com> | 2015-09-24 17:58:49 -0700 |
---|---|---|
committer | Filipe Brandenburger <filbranden@google.com> | 2015-09-24 18:01:36 -0700 |
commit | f5c72b739e3252fda11936483ba93963895c4bf2 (patch) | |
tree | 94cdfde6212c0045564f767e9db5b6a96fc06ef1 /src/basic/util.h | |
parent | eb1d47c06d7d00fb0512279c950311f528ecf5b7 (diff) |
util: refactor cpu_set parsing into its own function
Use the new code in config_parse_cpu_affinity2.
Tested by modifying CPUAffinity=... setting in /etc/systemd/system.conf
and reloading the daemon, then checking ^Cpus_allowed in /proc/1/status
to confirm the correct CPU mask is in place.
Diffstat (limited to 'src/basic/util.h')
-rw-r--r-- | src/basic/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/util.h b/src/basic/util.h index d53e15e6e6..56d9f037bf 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -375,6 +375,7 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(cpu_set_t*, CPU_FREE); #define _cleanup_cpu_free_ _cleanup_(CPU_FREEp) cpu_set_t* cpu_set_malloc(unsigned *ncpus); +int parse_cpu_set(const char *rvalue, cpu_set_t **cpu_set, const char *unit, const char *filename, unsigned line, const char *lvalue); #define xsprintf(buf, fmt, ...) \ assert_message_se((size_t) snprintf(buf, ELEMENTSOF(buf), fmt, __VA_ARGS__) < ELEMENTSOF(buf), \ |