X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=mount.c;h=21d347785a0855bd45d4f3a38cc0d9ab5291ca8a;hp=fa92e5b7bb7a4fad76ff4e20fa4d115fe9ff4cd8;hb=c22cbe2672db2c95647c9412cfb4331d2be279a7;hpb=5cb5a6ffc33667c93e9bc3572534dcaa684046e3 diff --git a/mount.c b/mount.c index fa92e5b7b..21d347785 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 };