chiark / gitweb /
main: fix loading of default target
[elogind.git] / src / core / main.c
index 102cc3b3158352ca96c48263fb63d76df3fc48ad..2bd1efd5d02202362cd6bd90c4fccc038e64f1c5 100644 (file)
@@ -1679,7 +1679,7 @@ int main(int argc, char *argv[]) {
                                 log_error("Failed to load rescue target: %s", bus_error(&error, r));
                                 dbus_error_free(&error);
                                 goto finish;
-                        } else if (target->load_state == UNIT_ERROR || target->load_state == UNIT_ERROR) {
+                        } else if (target->load_state == UNIT_ERROR || target->load_state == UNIT_NOT_FOUND) {
                                 log_error("Failed to load rescue target: %s", strerror(-target->load_error));
                                 goto finish;
                         } else if (target->load_state == UNIT_MASKED) {