shared/mount-util: log correct errno

Follow-up for 5f48198af8
This commit is contained in:
Mike Yuan
2023-10-21 06:25:36 +08:00
parent 5d4072d0ed
commit 0f095d0b8f
+3 -2
View File
@@ -1107,8 +1107,9 @@ static int mount_in_namespace(
if (r > 0)
return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Failed to activate bind mount in target, not running in a mount namespace");
if (pidref_verify(target) < 0)
return log_debug_errno(SYNTHETIC_ERRNO(ESRCH), "Failed to verify target process '" PID_FMT "': %m", target->pid);
r = pidref_verify(target);
if (r < 0)
return log_debug_errno(r, "Failed to verify target process '" PID_FMT "': %m", target->pid);
r = chase(src, NULL, 0, &chased_src_path, &chased_src_fd);
if (r < 0)