mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 11:01:19 +00:00
fdstream: report error if virSetNonBlock fails
virFDStreamOpenInternal terminates if virSetNonBlock fails. As virSetNonBlock uses gnulib's set_nonblocking_flag that sets errno, call virReportSystemError() to let user know the reason of fail.
This commit is contained in:
parent
4b772e469d
commit
eb626b49fd
@ -478,8 +478,10 @@ static int virFDStreamOpenInternal(virStreamPtr st,
|
||||
st, fd, cmd, errfd, length);
|
||||
|
||||
if ((st->flags & VIR_STREAM_NONBLOCK) &&
|
||||
virSetNonBlock(fd) < 0)
|
||||
virSetNonBlock(fd) < 0) {
|
||||
virReportSystemError(errno, "%s", _("Unable to set non-blocking mode"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(fdst) < 0)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user