chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make use of unit_add_dependency_by_name() where applicable
[elogind.git]
/
snapshot.c
diff --git
a/snapshot.c
b/snapshot.c
index fc7bb5f47898e1b42e0c8757a7586e160a3d5e28..3e55075269e894477ac8d18ac22f2310477a6025 100644
(file)
--- a/
snapshot.c
+++ b/
snapshot.c
@@
-1,31
+1,24
@@
/*-*- Mode: C; c-basic-offset: 8 -*-*/
/*-*- Mode: C; c-basic-offset: 8 -*-*/
-#include "
name
.h"
+#include "
unit
.h"
#include "snapshot.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 */
}
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_stat
e,
+ .
done = snapshot_don
e,
- .
free_hook = snapshot_free_hook
+ .
active_state = snapshot_active_state
};
};