/*-*- Mode: C; c-basic-offset: 8 -*-*/
-#include "name.h"
+#include "unit.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);
+static void snapshot_done(Unit *u) {
+ Snapshot *s = SNAPSHOT(u);
assert(s);
/* Nothing here for now */
}
-const NameVTable snapshot_vtable = {
- .suffix = ".snapshot",
-
- .load = NULL,
- .dump = NULL,
+static UnitActiveState snapshot_active_state(Unit *u) {
+ return SNAPSHOT(u)->state == SNAPSHOT_DEAD ? UNIT_INACTIVE : UNIT_ACTIVE;
+}
- .start = NULL,
- .stop = NULL,
- .reload = NULL,
+const UnitVTable snapshot_vtable = {
+ .suffix = ".snapshot",
- .active_state = snapshot_active_state,
+ .done = snapshot_done,
- .free_hook = snapshot_free_hook
+ .active_state = snapshot_active_state
};