]> git.ipfire.org Git - thirdparty/systemd.git/blob - snapshot.c
first attempt in implementinging execution logic
[thirdparty/systemd.git] / snapshot.c
1 /*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3 #include "name.h"
4 #include "snapshot.h"
5
6 static NameActiveState snapshot_active_state(Name *n) {
7 return SNAPSHOT(n)->state == SNAPSHOT_DEAD ? NAME_INACTIVE : NAME_ACTIVE;
8 }
9
10 static void snapshot_free_hook(Name *n) {
11 Snapshot *s = SNAPSHOT(n);
12
13 assert(s);
14
15 /* Nothing here for now */
16 }
17
18 const NameVTable snapshot_vtable = {
19 .suffix = ".snapshot",
20
21 .load = NULL,
22 .dump = NULL,
23
24 .start = NULL,
25 .stop = NULL,
26 .reload = NULL,
27
28 .active_state = snapshot_active_state,
29
30 .free_hook = snapshot_free_hook
31 };