chiark / gitweb /
systemctl: don't show cgroup field for a unit if cgroup is empty
[elogind.git] / src / shared / conf-parser.c
index 4bf3147f2d2e9194efba31befa971728556278d2..9f5c07c761e2670ab75ca92676a8badcc6682cf8 100644 (file)
@@ -865,7 +865,7 @@ int config_parse_mode(
 
         errno = 0;
         l = strtol(rvalue, &x, 8);
-        if (!x || *x || errno) {
+        if (!x || x == rvalue || *x || errno) {
                 log_error("[%s:%u] Failed to parse mode value, ignoring: %s", filename, line, rvalue);
                 return 0;
         }