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;
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)