network/varlink: fix error cause

Follow-up for e1254d0616.

Addresses https://github.com/systemd/systemd/pull/31811#discussion_r1557552244.
This commit is contained in:
Yu Watanabe
2024-04-10 04:55:59 +09:00
parent fb6f98ae63
commit 4d97f7deeb

View File

@@ -207,7 +207,7 @@ static int vl_method_set_persistent_storage(Varlink *vlink, JsonVariant *paramet
}
if (fstat(fd, &st) < 0)
return log_warning_errno(r, "Failed to stat the passed persistent storage fd: %m");
return log_warning_errno(errno, "Failed to stat the passed persistent storage fd: %m");
r = stat_verify_directory(&st);
if (r < 0)