chiark / gitweb /
util: split-out hwclock.[ch]
[elogind.git] / src / core / unit.h
index d8f4644ca9a2966e967a47691273b8c5342657d1..33920892fdc0942136c897017849b188cf3289f9 100644 (file)
@@ -153,15 +153,19 @@ struct Unit {
         Set *names;
         Set *dependencies[_UNIT_DEPENDENCY_MAX];
 
+        char **requires_mounts_for;
+
         char *description;
 
         char *fragment_path; /* if loaded from a config file this is the primary path to it */
         usec_t fragment_mtime;
 
-        /* If there is something to do with this unit, then this is
-         * the job for it */
+        /* If there is something to do with this unit, then this is the installed job for it */
         Job *job;
 
+        /* JOB_NOP jobs are special and can be installed without disturbing the real job. */
+        Job *nop_job;
+
         usec_t job_timeout;
 
         /* References to this */
@@ -184,6 +188,9 @@ struct Unit {
         /* Per type list */
         LIST_FIELDS(Unit, units_by_type);
 
+        /* All units which have requires_mounts_for set */
+        LIST_FIELDS(Unit, has_requires_mounts_for);
+
         /* Load queue */
         LIST_FIELDS(Unit, load_queue);
 
@@ -200,7 +207,9 @@ struct Unit {
         unsigned gc_marker;
 
         /* When deserializing, temporarily store the job type for this
-         * unit here, if there was a job scheduled */
+         * unit here, if there was a job scheduled.
+         * Only for deserializing from a legacy version. New style uses full
+         * serialized jobs. */
         int deserialized_job; /* This is actually of type JobType */
 
         /* Error code when we didn't manage to load the unit (negative) */
@@ -550,6 +559,9 @@ void unit_ref_unset(UnitRef *ref);
 
 #define UNIT_DEREF(ref) ((ref).unit)
 
+int unit_add_one_mount_link(Unit *u, Mount *m);
+int unit_add_mount_links(Unit *u);
+
 const char *unit_load_state_to_string(UnitLoadState i);
 UnitLoadState unit_load_state_from_string(const char *s);