summaryrefslogtreecommitdiff
path: root/mount.c
diff options
context:
space:
mode:
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
};