summaryrefslogtreecommitdiff
path: root/src/main.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/main.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/main.c')
-rw-r--r--src/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 91516dad5a..cec9b499f3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1408,28 +1408,28 @@ int main(int argc, char *argv[]) {
if ((r = manager_load_unit(m, arg_default_unit, NULL, &error, &target)) < 0) {
log_error("Failed to load default target: %s", bus_error(&error, r));
dbus_error_free(&error);
- } else if (target->meta.load_state == UNIT_ERROR)
- log_error("Failed to load default target: %s", strerror(-target->meta.load_error));
- else if (target->meta.load_state == UNIT_MASKED)
+ } else if (target->load_state == UNIT_ERROR)
+ log_error("Failed to load default target: %s", strerror(-target->load_error));
+ else if (target->load_state == UNIT_MASKED)
log_error("Default target masked.");
- if (!target || target->meta.load_state != UNIT_LOADED) {
+ if (!target || target->load_state != UNIT_LOADED) {
log_info("Trying to load rescue target...");
if ((r = manager_load_unit(m, SPECIAL_RESCUE_TARGET, NULL, &error, &target)) < 0) {
log_error("Failed to load rescue target: %s", bus_error(&error, r));
dbus_error_free(&error);
goto finish;
- } else if (target->meta.load_state == UNIT_ERROR) {
- log_error("Failed to load rescue target: %s", strerror(-target->meta.load_error));
+ } else if (target->load_state == UNIT_ERROR) {
+ log_error("Failed to load rescue target: %s", strerror(-target->load_error));
goto finish;
- } else if (target->meta.load_state == UNIT_MASKED) {
+ } else if (target->load_state == UNIT_MASKED) {
log_error("Rescue target masked.");
goto finish;
}
}
- assert(target->meta.load_state == UNIT_LOADED);
+ assert(target->load_state == UNIT_LOADED);
if (arg_action == ACTION_TEST) {
printf("-> By units:\n");