summaryrefslogtreecommitdiff
path: root/src/load-dropin.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-01-15 12:04:08 +0100
committerMichal Schmidt <mschmidt@redhat.com>2012-01-16 13:34:42 +0100
commitac155bb885f9ea8aac3979a6b2686f0c8a9cc6e3 (patch)
tree6d78545bae4ffd262ddf4fd71d17ded342c530ca /src/load-dropin.c
parent7d17cfbc46306a106dbda0f3e92fbc0792d1e9e9 (diff)
unit: remove union Unit
Now that objects of all unit types are allocated the exact amount of memory they need, the Unit union has lost its purpose. Remove it. "Unit" is a more natural name for the base unit class than "Meta", so rename Meta to Unit. Access to members of the base class gets simplified.
Diffstat (limited to 'src/load-dropin.c')
-rw-r--r--src/load-dropin.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/load-dropin.c b/src/load-dropin.c
index d114faa41f..d869ee0c76 100644
--- a/src/load-dropin.c
+++ b/src/load-dropin.c
@@ -61,7 +61,7 @@ static int iterate_dir(Unit *u, const char *path, UnitDependency dependency) {
free(f);
if (r < 0)
- log_error("Cannot add dependency %s to %s, ignoring: %s", de->d_name, u->meta.id, strerror(-r));
+ log_error("Cannot add dependency %s to %s, ignoring: %s", de->d_name, u->id, strerror(-r));
}
r = 0;
@@ -84,8 +84,8 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c
if (!path)
return -ENOMEM;
- if (u->meta.manager->unit_path_cache &&
- !set_get(u->meta.manager->unit_path_cache, path))
+ if (u->manager->unit_path_cache &&
+ !set_get(u->manager->unit_path_cache, path))
r = 0;
else
r = iterate_dir(u, path, dependency);
@@ -94,7 +94,7 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c
if (r < 0)
return r;
- if (u->meta.instance) {
+ if (u->instance) {
char *template;
/* Also try the template dir */
@@ -108,8 +108,8 @@ static int process_dir(Unit *u, const char *unit_path, const char *name, const c
if (!path)
return -ENOMEM;
- if (u->meta.manager->unit_path_cache &&
- !set_get(u->meta.manager->unit_path_cache, path))
+ if (u->manager->unit_path_cache &&
+ !set_get(u->manager->unit_path_cache, path))
r = 0;
else
r = iterate_dir(u, path, dependency);
@@ -130,10 +130,10 @@ int unit_load_dropin(Unit *u) {
/* Load dependencies from supplementary drop-in directories */
- SET_FOREACH(t, u->meta.names, i) {
+ SET_FOREACH(t, u->names, i) {
char **p;
- STRV_FOREACH(p, u->meta.manager->lookup_paths.unit_path) {
+ STRV_FOREACH(p, u->manager->lookup_paths.unit_path) {
int r;
r = process_dir(u, *p, t, ".wants", UNIT_WANTS);