chiark / gitweb /
core: interpret \; token in ExecStart as escaped ;
[elogind.git] / src / core / load-fragment.c
index 93f051af470ec8ab8f81c08c98b050acb150f86a..4dc5c529a2bcca544c3049c9bc2e89a2b7c5a5e6 100644 (file)
@@ -326,10 +326,12 @@ int config_parse_socket_bind(
 
         s = SOCKET(data);
 
-        if ((b = socket_address_bind_ipv6_only_from_string(rvalue)) < 0) {
+        b = socket_address_bind_ipv6_only_from_string(rvalue);
+        if (b < 0) {
                 int r;
 
-                if ((r = parse_boolean(rvalue)) < 0) {
+                r = parse_boolean(rvalue);
+                if (r < 0) {
                         log_error("[%s:%u] Failed to parse bind IPv6 only value, ignoring: %s", filename, line, rvalue);
                         return 0;
                 }
@@ -481,6 +483,8 @@ int config_parse_exec(
                 FOREACH_WORD_QUOTED(w, l, rvalue, state) {
                         if (strncmp(w, ";", MAX(l, 1U)) == 0)
                                 break;
+                        else if (strncmp(w, "\\;", MAX(l, 1U)) == 0)
+                                w ++;
 
                         if (honour_argv0 && w == rvalue) {
                                 assert(!path);
@@ -614,7 +618,8 @@ int config_parse_exec_io_class(
         assert(rvalue);
         assert(data);
 
-        if ((x = ioprio_class_from_string(rvalue)) < 0) {
+        x = ioprio_class_from_string(rvalue);
+        if (x < 0) {
                 log_error("[%s:%u] Failed to parse IO scheduling class, ignoring: %s", filename, line, rvalue);
                 return 0;
         }
@@ -673,7 +678,8 @@ int config_parse_exec_cpu_sched_policy(
         assert(rvalue);
         assert(data);
 
-        if ((x = sched_policy_from_string(rvalue)) < 0) {
+        x = sched_policy_from_string(rvalue);
+        if (x < 0) {
                 log_error("[%s:%u] Failed to parse CPU scheduling policy, ignoring: %s", filename, line, rvalue);
                 return 0;
         }
@@ -1450,11 +1456,11 @@ int config_parse_ip_tos(
         assert(rvalue);
         assert(data);
 
-        if ((x = ip_tos_from_string(rvalue)) < 0)
-                if (safe_atoi(rvalue, &x) < 0) {
-                        log_error("[%s:%u] Failed to parse IP TOS value, ignoring: %s", filename, line, rvalue);
-                        return 0;
-                }
+        x = ip_tos_from_string(rvalue);
+        if (x < 0) {
+                log_error("[%s:%u] Failed to parse IP TOS value, ignoring: %s", filename, line, rvalue);
+                return 0;
+        }
 
         *ip_tos = x;
         return 0;