]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/analyze/analyze-verify.c
Merge pull request #11827 from keszybz/pkgconfig-variables
[thirdparty/systemd.git] / src / analyze / analyze-verify.c
index d2f9e5528ee653eb27dad95303f58444923ddb6a..1d8a1ed7b3249f3d2624241df02df43806cf7802 100644 (file)
@@ -43,10 +43,7 @@ static int prepare_filename(const char *filename, char **ret) {
         if (!dir)
                 return -ENOMEM;
 
-        if (with_instance)
-                c = path_join(NULL, dir, with_instance);
-        else
-                c = path_join(NULL, dir, name);
+        c = path_join(dir, with_instance ?: name);
         if (!c)
                 return -ENOMEM;
 
@@ -179,9 +176,9 @@ static int verify_documentation(Unit *u, bool check_man) {
                         k = show_man_page(*p + 4, true);
                         if (k != 0) {
                                 if (k < 0)
-                                        log_unit_error_errno(u, r, "Can't show %s: %m", *p);
+                                        log_unit_error_errno(u, k, "Can't show %s: %m", *p + 4);
                                 else {
-                                        log_unit_error_errno(u, r, "man %s command failed with code %d", *p + 4, k);
+                                        log_unit_error(u, "Command 'man %s' failed with code %d", *p + 4, k);
                                         k = -ENOEXEC;
                                 }
                                 if (r == 0)
@@ -254,7 +251,7 @@ int verify_units(char **filenames, UnitFileScope scope, bool check_man, bool run
 
         r = manager_startup(m, NULL, NULL);
         if (r < 0)
-                return log_error_errno(r, "Failed to start manager: %m");
+                return r;
 
         manager_clear_jobs(m);