mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
Report 'errno' in int1 field of virErrorPtr
When reporting a system error (VIR_ERR_SYSTEM_ERROR) via virReportSystemError, we should copy the errno value into the 'int1' field of the virErrorPtr struct. This allows callers to detect certain errno conditions & discard the error * src/util/virterror.c: Place errno value in int1 field
This commit is contained in:
parent
3399875965
commit
2ef6f69a1b
@ -1289,7 +1289,7 @@ void virReportSystemErrorFull(int domcode,
|
|||||||
|
|
||||||
virRaiseErrorFull(filename, funcname, linenr,
|
virRaiseErrorFull(filename, funcname, linenr,
|
||||||
domcode, VIR_ERR_SYSTEM_ERROR, VIR_ERR_ERROR,
|
domcode, VIR_ERR_SYSTEM_ERROR, VIR_ERR_ERROR,
|
||||||
msg, msgDetail, NULL, -1, -1, msg, msgDetail);
|
msg, msgDetail, NULL, theerrno, -1, msg, msgDetail);
|
||||||
errno = save_errno;
|
errno = save_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user