chiark / gitweb /
first try at implementing job creation
[elogind.git] / main.c
diff --git a/main.c b/main.c
index f19fb6b..a5c1694 100644 (file)
--- a/main.c
+++ b/main.c
@@ -23,12 +23,13 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
-        manager_dump_names(m, stdout);
 
-        /* if ((r = manager_add_job(m, JOB_START, milestone, JOB_REPLACE, &job)) < 0) { */
-        /*         fprintf(stderr, "Failed to start default milestone: %s\n", strerror(-r)); */
-        /*         goto finish; */
-        /* } */
+        if ((r = manager_add_job(m, JOB_START, milestone, JOB_REPLACE, &job)) < 0) {
+                fprintf(stderr, "Failed to start default milestone: %s\n", strerror(-r));
+                goto finish;
+        }
+
+        manager_dump_names(m, stdout);
 
         retval = 0;