]> err.no Git - systemd/commitdiff
unit: rename load_path to fragment_path to make clear what kind of configuration...
authorLennart Poettering <lennart@poettering.net>
Sun, 14 Feb 2010 00:01:10 +0000 (01:01 +0100)
committerLennart Poettering <lennart@poettering.net>
Sun, 14 Feb 2010 00:01:10 +0000 (01:01 +0100)
dbus-unit.c
load-fragment.c
manager.c
systemadm.vala
systemd-interfaces.vala
unit.c
unit.h

index f48433b60bc16cabe3de97f5b624dd758128c556..00374e7fad1cfe654e368dfea45f30541c4ad61e 100644 (file)
@@ -49,7 +49,7 @@ static const char introspection[] =
         "  <property name=\"Description\" type=\"s\" access=\"read\"/>"
         "  <property name=\"LoadState\" type=\"s\" access=\"read\"/>"
         "  <property name=\"ActiveState\" type=\"s\" access=\"read\"/>"
-        "  <property name=\"LoadPath\" type=\"s\" access=\"read\"/>"
+        "  <property name=\"FragmentPath\" type=\"s\" access=\"read\"/>"
         "  <property name=\"ActiveEnterTimestamp\" type=\"t\" access=\"read\"/>"
         "  <property name=\"ActiveExitTimestamp\" type=\"t\" access=\"read\"/>"
         "  <property name=\"CanReload\" type=\"b\" access=\"read\"/>"
@@ -217,7 +217,7 @@ static DBusHandlerResult bus_unit_message_dispatch(Unit *u, DBusMessage *message
                 { "org.freedesktop.systemd1.Unit", "Description",          bus_unit_append_description,  "s",    u                               },
                 { "org.freedesktop.systemd1.Unit", "LoadState",            bus_unit_append_load_state,   "s",    u                               },
                 { "org.freedesktop.systemd1.Unit", "ActiveState",          bus_unit_append_active_state, "s",    u                               },
-                { "org.freedesktop.systemd1.Unit", "LoadPath",             bus_property_append_string,   "s",    u->meta.load_path               },
+                { "org.freedesktop.systemd1.Unit", "FragmentPath",         bus_property_append_string,   "s",    u->meta.fragment_path           },
                 { "org.freedesktop.systemd1.Unit", "ActiveEnterTimestamp", bus_property_append_uint64,   "t",    &u->meta.active_enter_timestamp },
                 { "org.freedesktop.systemd1.Unit", "ActiveExitTimestamp",  bus_property_append_uint64,   "t",    &u->meta.active_exit_timestamp  },
                 { "org.freedesktop.systemd1.Unit", "CanReload",            bus_unit_append_can_reload,   "b",    u                               },
index 64e66f314ef44e576114cb9bccb5bffe82867ccd..4183b5c8fa912eec2ed5f412804c7eb6e1b29659 100644 (file)
@@ -1207,8 +1207,8 @@ static int load_from_path(Unit *u, const char *path) {
         }
 
 
-        free(u->meta.load_path);
-        u->meta.load_path = filename;
+        free(u->meta.fragment_path);
+        u->meta.fragment_path = filename;
         filename = NULL;
 
         r = 1; /* returning 1 means: suitable config file found and loaded */
@@ -1229,8 +1229,8 @@ int unit_load_fragment(Unit *u) {
         assert(u);
         assert(u->meta.load_state == UNIT_STUB);
 
-        if (u->meta.load_path)
-                r = load_from_path(u, u->meta.load_path);
+        if (u->meta.fragment_path)
+                r = load_from_path(u, u->meta.fragment_path);
         else {
                 Iterator i;
                 char *t;
index 68a662826af90161310b66435d7de0d79938d03d..cb447568917026a22ceabc76bfa81c4065f86e44 100644 (file)
--- a/manager.c
+++ b/manager.c
@@ -1184,7 +1184,7 @@ int manager_load_unit(Manager *m, const char *path, Unit **_ret) {
                 return -ENOMEM;
 
         if (is_path(path)) {
-                if (!(ret->meta.load_path = strdup(path))) {
+                if (!(ret->meta.fragment_path = strdup(path))) {
                         unit_free(ret);
                         return -ENOMEM;
                 }
index edb3a389bf58f6cbcc35e7f05f1533cd213216e6..bc4f9403e62c14709027ede7b7c323cf79e3dd67 100644 (file)
@@ -68,7 +68,7 @@ public class MainWindow : Window {
         private RightLabel unit_description_label;
         private RightLabel unit_load_state_label;
         private RightLabel unit_active_state_label;
-        private RightLabel unit_load_path_label;
+        private RightLabel unit_fragment_path_label;
         private RightLabel unit_active_enter_timestamp_label;
         private RightLabel unit_active_exit_timestamp_label;
         private RightLabel unit_can_start_label;
@@ -133,7 +133,7 @@ public class MainWindow : Window {
                 unit_description_label = new RightLabel();
                 unit_load_state_label = new RightLabel();
                 unit_active_state_label = new RightLabel();
-                unit_load_path_label = new RightLabel();
+                unit_fragment_path_label = new RightLabel();
                 unit_active_enter_timestamp_label = new RightLabel();
                 unit_active_exit_timestamp_label = new RightLabel();
                 unit_can_start_label = new RightLabel();
@@ -161,8 +161,8 @@ public class MainWindow : Window {
                 unit_table.attach(unit_load_state_label, 1, 2, 2, 3, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
                 unit_table.attach(new LeftLabel("Active State:"), 0, 1, 3, 4, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
                 unit_table.attach(unit_active_state_label, 1, 2, 3, 4, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
-                unit_table.attach(new LeftLabel("Load Path:"), 0, 1, 4, 5, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
-                unit_table.attach(unit_load_path_label, 1, 2, 4, 5, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
+                unit_table.attach(new LeftLabel("Fragment Path:"), 0, 1, 4, 5, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
+                unit_table.attach(unit_fragment_path_label, 1, 2, 4, 5, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
                 unit_table.attach(new LeftLabel("Active Enter Timestamp:"), 0, 1, 5, 6, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
                 unit_table.attach(unit_active_enter_timestamp_label, 1, 2, 5, 6, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
                 unit_table.attach(new LeftLabel("Active Exit Timestamp:"), 0, 1, 6, 7, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
@@ -311,7 +311,7 @@ public class MainWindow : Window {
                 unit_description_label.set_text_or_na();
                 unit_load_state_label.set_text_or_na();
                 unit_active_state_label.set_text_or_na();
-                unit_load_path_label.set_text_or_na();
+                unit_fragment_path_label.set_text_or_na();
                 unit_active_enter_timestamp_label.set_text_or_na();
                 unit_active_exit_timestamp_label.set_text_or_na();
                 unit_can_reload_label.set_text_or_na();
@@ -323,7 +323,7 @@ public class MainWindow : Window {
                 unit_description_label.set_text_or_na(unit.description);
                 unit_load_state_label.set_text_or_na(unit.load_state);
                 unit_active_state_label.set_text_or_na(unit.active_state);
-                unit_load_path_label.set_text_or_na(unit.load_path);
+                unit_fragment_path_label.set_text_or_na(unit.fragment_path);
 
                 uint64 t = unit.active_enter_timestamp;
                 if (t > 0) {
index 6eba8a5580f4442517222bbd075fc8f6b16199bf..9947df54a73a2c45d9e75a91ce75883faad433f1 100644 (file)
@@ -71,7 +71,7 @@ public interface Unit : DBus.Object {
         public abstract string description { owned get; }
         public abstract string load_state { owned get; }
         public abstract string active_state { owned get; }
-        public abstract string load_path { owned get; }
+        public abstract string fragment_path { owned get; }
         public abstract uint64 active_enter_timestamp { owned get; }
         public abstract uint64 active_exit_timestamp { owned get; }
         public abstract bool can_reload { owned get; }
diff --git a/unit.c b/unit.c
index b8a1d8bb338259a1edac08b5199f4db409831013..980c3711eb147d60075c416643d54e74bd57f69a 100644 (file)
--- a/unit.c
+++ b/unit.c
@@ -284,7 +284,7 @@ void unit_free(Unit *u) {
                 bidi_set_free(u, u->meta.dependencies[d]);
 
         free(u->meta.description);
-        free(u->meta.load_path);
+        free(u->meta.fragment_path);
 
         while ((t = set_steal_first(u->meta.names)))
                 free(t);
@@ -397,8 +397,8 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) {
                 prefix, yes_no(u->meta.recursive_stop),
                 prefix, yes_no(u->meta.stop_when_unneeded));
 
-        if (u->meta.load_path)
-                fprintf(f, "%s\tLoad Path: %s\n", prefix, u->meta.load_path);
+        if (u->meta.fragment_path)
+                fprintf(f, "%s\tFragment Path: %s\n", prefix, u->meta.fragment_path);
 
         SET_FOREACH(t, u->meta.names, i)
                 fprintf(f, "%s\tName: %s\n", prefix, t);
diff --git a/unit.h b/unit.h
index 322e4aed90e199faf427d75a1e31e666a3599037..9527d192d1c45cb03c87b10b1f4c96fdd45aeb1a 100644 (file)
--- a/unit.h
+++ b/unit.h
@@ -124,7 +124,7 @@ struct Meta {
         Set *dependencies[_UNIT_DEPENDENCY_MAX];
 
         char *description;
-        char *load_path; /* if loaded from a config file this is the primary path to it */
+        char *fragment_path; /* if loaded from a config file this is the primary path to it */
 
         /* If there is something to do with this unit, then this is
          * the job for it */