chiark / gitweb /
shutdown: issue a sync() as soon as shutdown.target is queued
[elogind.git] / src / core / job.h
index 3208e6c65ce1e8f6a9b25e17bda29a06d94ae3ac..d10e6b6b0eff674edd86c4b8ce47166c7ccef695 100644 (file)
@@ -1,7 +1,6 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#ifndef foojobhfoo
-#define foojobhfoo
+#pragma once
 
 /***
   This file is part of systemd.
@@ -92,12 +91,12 @@ enum JobMode {
 };
 
 enum JobResult {
-        JOB_DONE,
-        JOB_CANCELED,
-        JOB_TIMEOUT,
-        JOB_FAILED,
-        JOB_DEPENDENCY,
-        JOB_SKIPPED,
+        JOB_DONE,                /* Job completed successfully */
+        JOB_CANCELED,            /* Job canceled by a conflicting job installation or by explicit cancel request */
+        JOB_TIMEOUT,             /* JobTimeout elapsed */
+        JOB_FAILED,              /* Job failed */
+        JOB_DEPENDENCY,          /* A required dependency job did not result in JOB_DONE */
+        JOB_SKIPPED,             /* JOB_RELOAD of inactive unit; negative result of JOB_VERIFY_ACTIVE */
         _JOB_RESULT_MAX,
         _JOB_RESULT_INVALID = -1
 };
@@ -218,6 +217,8 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive);
 
 char *job_dbus_path(Job *j);
 
+void job_shutdown_magic(Job *j);
+
 const char* job_type_to_string(JobType t);
 JobType job_type_from_string(const char *s);
 
@@ -229,5 +230,3 @@ JobMode job_mode_from_string(const char *s);
 
 const char* job_result_to_string(JobResult t);
 JobResult job_result_from_string(const char *s);
-
-#endif