]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: fix parsing of mount flags
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Apr 2015 14:21:38 +0000 (16:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Apr 2015 14:21:38 +0000 (16:21 +0200)
As reported my Maciej Wereski:

http://lists.freedesktop.org/archives/systemd-devel/2015-February/028320.html

src/core/load-fragment.c

index eada71e227dd77f5277d7df80d85bfbc9a468ee3..b76656b93110ac856042a253436914df7624f174 100644 (file)
@@ -1202,17 +1202,15 @@ int config_parse_exec_mount_flags(const char *unit,
                         flags = MS_SHARED;
                 else if (streq(t, "slave"))
                         flags = MS_SLAVE;
-                else if (streq(word, "private"))
+                else if (streq(t, "private"))
                         flags = MS_PRIVATE;
                 else {
-                        log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                                   "Failed to parse mount flag %s, ignoring: %s", t, rvalue);
+                        log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Failed to parse mount flag %s, ignoring: %s", t, rvalue);
                         return 0;
                 }
         }
         if (!isempty(state))
-                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
-                           "Trailing garbage, ignoring.");
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL, "Trailing garbage, ignoring.");
 
         c->mount_flags = flags;
         return 0;