dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
a4b143
From 5a09d8f3a0b610beaef3445abb57f45daae6f10f Mon Sep 17 00:00:00 2001
a4b143
From: Lennart Poettering <lennart@poettering.net>
a4b143
Date: Wed, 9 Oct 2013 00:13:55 +0200
a4b143
Subject: [PATCH] core: unify the way we denote serialization attributes
a4b143
a4b143
---
a4b143
 src/core/service.c | 6 +++---
a4b143
 1 file changed, 3 insertions(+), 3 deletions(-)
a4b143
a4b143
diff --git a/src/core/service.c b/src/core/service.c
a4b143
index 7a78060..cfc8ba6 100644
a4b143
--- a/src/core/service.c
a4b143
+++ b/src/core/service.c
a4b143
@@ -2654,7 +2654,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
a4b143
                 unit_serialize_item(u, f, "var-tmp-dir", s->exec_context.var_tmp_dir);
a4b143
 
a4b143
         if (s->forbid_restart)
a4b143
-                unit_serialize_item(u, f, "forbid_restart", yes_no(s->forbid_restart));
a4b143
+                unit_serialize_item(u, f, "forbid-restart", yes_no(s->forbid_restart));
a4b143
 
a4b143
         return 0;
a4b143
 }
a4b143
@@ -2792,12 +2792,12 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value,
a4b143
                         return log_oom();
a4b143
 
a4b143
                 s->exec_context.var_tmp_dir = t;
a4b143
-        } else if (streq(key, "forbid_restart")) {
a4b143
+        } else if (streq(key, "forbid-restart")) {
a4b143
                 int b;
a4b143
 
a4b143
                 b = parse_boolean(value);
a4b143
                 if (b < 0)
a4b143
-                        log_debug_unit(u->id, "Failed to parse forbid_restart value %s", value);
a4b143
+                        log_debug_unit(u->id, "Failed to parse forbid-restart value %s", value);
a4b143
                 else
a4b143
                         s->forbid_restart = b;
a4b143
         } else