]> git.ipfire.org Git - people/ms/systemd.git/blame - snapshot.c
add simple event loop
[people/ms/systemd.git] / snapshot.c
CommitLineData
5cb5a6ff
LP
1/*-*- Mode: C; c-basic-offset: 8 -*-*/
2
3#include "name.h"
4#include "snapshot.h"
5
6static NameActiveState snapshot_active_state(Name *n) {
7 return SNAPSHOT(n)->state == SNAPSHOT_DEAD ? NAME_INACTIVE : NAME_ACTIVE;
8}
9
10static void snapshot_free_hook(Name *n) {
11 Snapshot *s = SNAPSHOT(n);
12
13 assert(s);
14
15 /* Nothing here for now */
16}
17
18const 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};