1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

Fix three uses of bogus errno value in logs (and returned value in one case)

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-04-24 13:45:44 +02:00
parent b1c05b98bf
commit 4355f1c9da
2 changed files with 4 additions and 3 deletions

View File

@ -186,7 +186,7 @@ static int exec_process(const char* name, char **argv, char **env, int start_fd,
r = rearrange_stdio(start_fd, start_fd, STDERR_FILENO); /* invalidates start_fd on success + error */
if (r < 0)
return log_error_errno(errno, "Failed to move fd to stdin+stdout: %m");
return log_error_errno(r, "Failed to move fd to stdin+stdout: %m");
} else {
if (start_fd != SD_LISTEN_FDS_START) {

View File

@ -691,13 +691,14 @@ int bpf_firewall_supported(void) {
1,
BPF_F_NO_PREALLOC);
if (fd < 0) {
log_debug_errno(r, "Can't allocate BPF LPM TRIE map, BPF firewalling is not supported: %m");
log_debug_errno(fd, "Can't allocate BPF LPM TRIE map, BPF firewalling is not supported: %m");
return supported = BPF_FIREWALL_UNSUPPORTED;
}
safe_close(fd);
if (bpf_program_new(BPF_PROG_TYPE_CGROUP_SKB, &program) < 0) {
r = bpf_program_new(BPF_PROG_TYPE_CGROUP_SKB, &program);
if (r < 0) {
log_debug_errno(r, "Can't allocate CGROUP SKB BPF program, BPF firewalling is not supported: %m");
return supported = BPF_FIREWALL_UNSUPPORTED;
}