]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mount: merge redundant call mount_needs_network() into mount_is_network()
authorLennart Poettering <lennart@poettering.net>
Wed, 28 Nov 2018 11:32:14 +0000 (12:32 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Dec 2018 16:30:14 +0000 (17:30 +0100)
src/core/mount.c

index afdbaa1d9d0389c6f4b299f42e897c8e612eb72c..de5c83928f8622c18e522409e7f7f7f3bdc9ad38 100644 (file)
@@ -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);