summaryrefslogtreecommitdiff
path: root/snapshot.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-23 01:52:57 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-23 01:52:57 +0100
commit5cb5a6ffc33667c93e9bc3572534dcaa684046e3 (patch)
tree51e8b6260d56027c4d610ff6db5882737101a809 /snapshot.c
parentcd2dbd7df9f1b8c46386b2898523aec3dd4578fd (diff)
first attempt in implementinging execution logic
Diffstat (limited to 'snapshot.c')
-rw-r--r--snapshot.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/snapshot.c b/snapshot.c
new file mode 100644
index 0000000000..fc7bb5f478
--- /dev/null
+++ b/snapshot.c
@@ -0,0 +1,31 @@
+/*-*- Mode: C; c-basic-offset: 8 -*-*/
+
+#include "name.h"
+#include "snapshot.h"
+
+static NameActiveState snapshot_active_state(Name *n) {
+ return SNAPSHOT(n)->state == SNAPSHOT_DEAD ? NAME_INACTIVE : NAME_ACTIVE;
+}
+
+static void snapshot_free_hook(Name *n) {
+ Snapshot *s = SNAPSHOT(n);
+
+ assert(s);
+
+ /* Nothing here for now */
+}
+
+const NameVTable snapshot_vtable = {
+ .suffix = ".snapshot",
+
+ .load = NULL,
+ .dump = NULL,
+
+ .start = NULL,
+ .stop = NULL,
+ .reload = NULL,
+
+ .active_state = snapshot_active_state,
+
+ .free_hook = snapshot_free_hook
+};