} while (i_stream_read(ibc->value_input) > 0);
if (ibc->value_input->eof) {
if (ibc->value_input->stream_errno != 0) {
- errno = ibc->value_input->stream_errno;
- i_error("dsync(%s): read() failed: %m", ibc->name);
+ i_error("dsync(%s): read() failed: %s", ibc->name,
+ i_stream_get_error(ibc->value_input));
dsync_ibc_stream_stop(ibc);
return -1;
}
i_assert(ret == -1);
if (ibc->value_output->stream_errno != 0) {
- i_error("dsync(%s): read(%s) failed: %m",
- ibc->name, i_stream_get_name(ibc->value_output));
+ i_error("dsync(%s): read(%s) failed: %s",
+ ibc->name, i_stream_get_name(ibc->value_output),
+ i_stream_get_error(ibc->value_output));
dsync_ibc_stream_stop(ibc);
return -1;
}
return -1;
error = t_str_new(128);
if (ibc->input->stream_errno != 0) {
- errno = ibc->input->stream_errno;
- str_printfa(error, "read(%s) failed: %m", ibc->name);
+ str_printfa(error, "read(%s) failed: %s", ibc->name,
+ i_stream_get_error(ibc->input));
} else {
i_assert(ibc->input->eof);
str_printfa(error, "read(%s) failed: EOF", ibc->name);
}
if (input1->stream_errno != 0) {
errno = input1->stream_errno;
- i_error("read(%s) failed: %m", i_stream_get_name(input1));
+ i_error("read(%s) failed: %s", i_stream_get_name(input1),
+ i_stream_get_error(input1));
return -1;
}
if (input2->stream_errno != 0) {
errno = input2->stream_errno;
- i_error("read(%s) failed: %m", i_stream_get_name(input2));
+ i_error("read(%s) failed: %s", i_stream_get_name(input2),
+ i_stream_get_error(input2));
return -1;
}
if (size1 == 0 && size2 == 0)
i_assert(ret == -1);
if (mail->input->stream_errno != 0) {
- errno = mail->input->stream_errno;
- i_error("Mailbox %s: read(msg input) failed: %m",
- mailbox_get_vname(importer->box));
+ i_error("Mailbox %s: read(msg input) failed: %s",
+ mailbox_get_vname(importer->box),
+ i_stream_get_error(mail->input));
mailbox_save_cancel(&save_ctx);
importer->failed = TRUE;
} else if (save_failed) {