fd = sd_journal_stream_fd(arg_identifier, arg_priority, arg_level_prefix);
if (fd < 0) {
- log_error_errno(-fd, "Failed to create stream fd: %m");
+ log_error_errno(fd, "Failed to create stream fd: %m");
r = fd;
goto finish;
}
if (dup3(fd, STDOUT_FILENO, 0) < 0 ||
dup3(fd, STDERR_FILENO, 0) < 0) {
- log_error("Failed to duplicate fd: %m");
+ log_error_errno(errno, "Failed to duplicate fd: %m");
r = -errno;
goto finish;
}
if (saved_stderr >= 0)
dup3(saved_stderr, STDERR_FILENO, 0);
- log_error_errno(-r, "Failed to execute process: %m");
+ log_error_errno(r, "Failed to execute process: %m");
finish:
safe_close(fd);