chiark / gitweb /
Merge remote-tracking branch 'origin/master'
[elogind.git] / src / shared / install.c
index c32d6599a68ef1906ebd949efb62d9c973722708..0fe1371129c59a9d169b1a06b4aa0221c9a8f198 100644 (file)
@@ -966,6 +966,9 @@ static int config_parse_also(
                 if (r < 0)
                         return r;
         }
+        if (!isempty(state))
+                log_syntax(unit, LOG_ERR, filename, line, EINVAL,
+                           "Trailing garbage, ignoring.");
 
         return 0;
 }
@@ -1058,7 +1061,7 @@ static int unit_file_load(
         assert(path);
 
         if (!isempty(root_dir))
-                path = strappenda3(root_dir, "/", path);
+                path = strappenda(root_dir, "/", path);
 
         fd = open(path, O_RDONLY|O_CLOEXEC|O_NOCTTY|(allow_symlink ? 0 : O_NOFOLLOW));
         if (fd < 0)