chiark / gitweb /
systemctl: don't show cgroup field for a unit if cgroup is empty
[elogind.git] / src / shared / conf-parser.c
index f3e258a65cd2a819d864de8de50654e6c31b1d3e..9f5c07c761e2670ab75ca92676a8badcc6682cf8 100644 (file)
@@ -593,7 +593,7 @@ int config_parse_string(
         assert(rvalue);
         assert(data);
 
-        n = cunescape(rvalue);
+        n = strdup(rvalue);
         if (!n)
                 return -ENOMEM;
 
@@ -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;
         }
@@ -981,8 +981,8 @@ int config_parse_set_status(
                                         return r;
                                 }
                         } else {
-                                log_error("[%s:%u] Failed to parse value: %s", filename, line, w);
-                                return r;
+                                log_error("[%s:%u] Failed to parse value, ignoring: %s", filename, line, w);
+                                return 0;
                         }
                 } else {
                         free(temp);
@@ -1001,7 +1001,7 @@ int config_parse_set_status(
                                 }
                         }
                 }
-
         }
+
         return 0;
 }