From: Lennart Poettering Date: Wed, 28 Nov 2018 11:32:14 +0000 (+0100) Subject: mount: merge redundant call mount_needs_network() into mount_is_network() X-Git-Tag: v240~112^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7121cbcffe887b1780ec0bcd2b67d9bb216763b9;p=thirdparty%2Fsystemd.git mount: merge redundant call mount_needs_network() into mount_is_network() --- diff --git a/src/core/mount.c b/src/core/mount.c index afdbaa1d9d0..de5c83928f8 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -68,22 +68,18 @@ static bool MOUNT_STATE_WITH_PROCESS(MountState state) { MOUNT_UNMOUNTING_SIGKILL); } -static bool mount_needs_network(const char *options, const char *fstype) { - if (fstab_test_option(options, "_netdev\0")) +static bool mount_is_network(const MountParameters *p) { + assert(p); + + if (fstab_test_option(p->options, "_netdev\0")) return true; - if (fstype && fstype_is_network(fstype)) + if (p->fstype && fstype_is_network(p->fstype)) return true; return false; } -static bool mount_is_network(const MountParameters *p) { - assert(p); - - return mount_needs_network(p->options, p->fstype); -} - static bool mount_is_loop(const MountParameters *p) { assert(p);