From: Zbigniew Jędrzejewski-Szmek Date: Thu, 17 Jan 2019 20:17:51 +0000 (+0100) Subject: core/mount: move static function earlier in file X-Git-Tag: v241-rc1~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7bbf89025d40cd73beccbb68fa1719d53aa8ab5;p=thirdparty%2Fsystemd.git core/mount: move static function earlier in file No functional change. --- diff --git a/src/core/mount.c b/src/core/mount.c index 4c5a02948c6..d7ecfd008af 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -251,6 +251,32 @@ _pure_ static MountParameters* get_mount_parameters(Mount *m) { return get_mount_parameters_fragment(m); } +static int update_parameters_proc_self_mount_info( + Mount *m, + const char *what, + const char *options, + const char *fstype) { + + MountParameters *p; + int r, q, w; + + p = &m->parameters_proc_self_mountinfo; + + r = free_and_strdup(&p->what, what); + if (r < 0) + return r; + + q = free_and_strdup(&p->options, options); + if (q < 0) + return q; + + w = free_and_strdup(&p->fstype, fstype); + if (w < 0) + return w; + + return r > 0 || q > 0 || w > 0; +} + static int mount_add_mount_dependencies(Mount *m) { MountParameters *pm; Unit *other; @@ -1428,32 +1454,6 @@ static int mount_dispatch_timer(sd_event_source *source, usec_t usec, void *user return 0; } -static int update_parameters_proc_self_mount_info( - Mount *m, - const char *what, - const char *options, - const char *fstype) { - - MountParameters *p; - int r, q, w; - - p = &m->parameters_proc_self_mountinfo; - - r = free_and_strdup(&p->what, what); - if (r < 0) - return r; - - q = free_and_strdup(&p->options, options); - if (q < 0) - return q; - - w = free_and_strdup(&p->fstype, fstype); - if (w < 0) - return w; - - return r > 0 || q > 0 || w > 0; -} - static int mount_setup_new_unit( Manager *m, const char *name,