diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-31 03:28:37 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-31 08:56:03 -0400 |
commit | b2fadec6048adb3596f2633cb7fe7a49f5937a18 (patch) | |
tree | 8969997ed3730146ff98774b14b3dcd65392c4df /src/core/main.c | |
parent | a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 (diff) |
Properly report invalid quoted strings
$ systemd-analyze verify trailing-g.service
[./trailing-g.service:2] Trailing garbage, ignoring.
trailing-g.service lacks ExecStart setting. Refusing.
Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument.
Failed to create trailing-g.service/start: Invalid argument
Diffstat (limited to 'src/core/main.c')
-rw-r--r-- | src/core/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c index fad15c7c3f..e9909ded5b 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -488,6 +488,9 @@ static int config_parse_cpu_affinity2( CPU_SET_S(cpu, CPU_ALLOC_SIZE(ncpus), c); } + if (!isempty(state)) + log_syntax(unit, LOG_ERR, filename, line, EINVAL, + "Trailing garbage, ignoring."); if (c) { if (sched_setaffinity(0, CPU_ALLOC_SIZE(ncpus), c) < 0) @@ -636,6 +639,9 @@ static int config_parse_join_controllers(const char *unit, arg_join_controllers = t; } } + if (!isempty(state)) + log_syntax(unit, LOG_ERR, filename, line, EINVAL, + "Trailing garbage, ignoring."); return 0; } |