X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=unit.h;h=8f9d9e98601925f308277f0501f8f178ee1141c4;hp=21627ef4d49b05ea77a371251dba34f487d05655;hb=05a602f468a4f00d36ee7da73f13c0b014786fea;hpb=c497c7a9e4db487eab4f92421a74d721d9558186 diff --git a/unit.h b/unit.h index 21627ef4d..8f9d9e986 100644 --- a/unit.h +++ b/unit.h @@ -61,6 +61,7 @@ enum UnitType { UNIT_AUTOMOUNT, UNIT_SNAPSHOT, UNIT_TIMER, + UNIT_SWAP, _UNIT_TYPE_MAX, _UNIT_TYPE_INVALID = -1 }; @@ -148,8 +149,10 @@ struct Meta { * the job for it */ Job *job; + usec_t inactive_exit_timestamp; usec_t active_enter_timestamp; usec_t active_exit_timestamp; + usec_t inactive_enter_timestamp; /* Counterparts in the cgroup filesystem */ CGroupBonding *cgroup_bondings; @@ -170,7 +173,7 @@ struct Meta { LIST_FIELDS(Meta, gc_queue); /* Used during GC sweeps */ - int gc_marker; + unsigned gc_marker; /* If we go down, pull down everything that depends on us, too */ bool recursive_stop; @@ -194,6 +197,7 @@ struct Meta { #include "mount.h" #include "automount.h" #include "snapshot.h" +#include "swap.h" union Unit { Meta meta; @@ -205,6 +209,7 @@ union Unit { Mount mount; Automount automount; Snapshot snapshot; + Swap swap; }; struct UnitVTable { @@ -335,6 +340,7 @@ DEFINE_CAST(DEVICE, Device); DEFINE_CAST(MOUNT, Mount); DEFINE_CAST(AUTOMOUNT, Automount); DEFINE_CAST(SNAPSHOT, Snapshot); +DEFINE_CAST(SWAP, Swap); Unit *unit_new(Manager *m); void unit_free(Unit *u); @@ -422,6 +428,8 @@ void unit_serialize_item_format(Unit *u, FILE *f, const char *key, const char *v void unit_serialize_item(Unit *u, FILE *f, const char *key, const char *value); int unit_deserialize(Unit *u, FILE *f, FDSet *fds); +int unit_add_node_link(Unit *u, const char *what, bool wants); + const char *unit_type_to_string(UnitType i); UnitType unit_type_from_string(const char *s);