chiark / gitweb /
cgroup: only delete empty cgroups
[elogind.git] / snapshot.h
index cde5a1385734af54ce60a318530d42d0dafd0419..78bcafa448c24075edb3e622f8b4c8419f49baf2 100644 (file)
@@ -28,16 +28,22 @@ typedef struct Snapshot Snapshot;
 
 typedef enum SnapshotState {
         SNAPSHOT_DEAD,
-        SNAPSHOT_ACTIVE
+        SNAPSHOT_ACTIVE,
+        _SNAPSHOT_STATE_MAX,
+        _SNAPSHOT_STATE_INVALID = -1
 } SnapshotState;
 
 struct Snapshot {
         Meta meta;
 
         SnapshotState state;
-        bool cleanup:1;
+
+        bool cleanup;
 };
 
 extern const UnitVTable snapshot_vtable;
 
+int snapshot_create(Manager *m, const char *name, bool cleanup, Snapshot **s);
+void snapshot_remove(Snapshot *s);
+
 #endif