summaryrefslogtreecommitdiff
path: root/mount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-26 04:18:44 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-26 04:18:44 +0100
commit034c6ed7da5e44bfdde5a5d0da75f7b7a59953b8 (patch)
treeea59315075d3ebda2de695b1bd0621d79fa9e987 /mount.c
parent9152c765065184d0c1267ed2499e3fe4cac53755 (diff)
first attempt at proper service/socket logic
Diffstat (limited to 'mount.c')
-rw-r--r--mount.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/mount.c b/mount.c
index fa92e5b7bb..21d347785a 100644
--- a/mount.c
+++ b/mount.c
@@ -8,7 +8,7 @@
#include "load-fstab.h"
#include "load-dropin.h"
-static int mount_load(Name *n) {
+static int mount_init(Name *n) {
int r;
Mount *m = MOUNT(n);
@@ -29,6 +29,13 @@ static int mount_load(Name *n) {
return r;
}
+static void mount_done(Name *n) {
+ Mount *d = MOUNT(n);
+
+ assert(d);
+ free(d->path);
+}
+
static void mount_dump(Name *n, FILE *f, const char *prefix) {
static const char* const state_table[_MOUNT_STATE_MAX] = {
@@ -63,24 +70,13 @@ static NameActiveState mount_active_state(Name *n) {
return table[MOUNT(n)->state];
}
-static void mount_free_hook(Name *n) {
- Mount *d = MOUNT(n);
-
- assert(d);
- free(d->path);
-}
-
const NameVTable mount_vtable = {
.suffix = ".mount",
- .load = mount_load,
- .dump = mount_dump,
+ .init = mount_init,
+ .done = mount_done,
- .start = NULL,
- .stop = NULL,
- .reload = NULL,
+ .dump = mount_dump,
.active_state = mount_active_state,
-
- .free_hook = mount_free_hook
};