On a Friday in 2024, Michal Privoznik wrote:
After previous cleanups, virSocketSendFD() is but a thin wrapper
over virSocketSendMsgWithFDs().
Almost.
virSocketSendFD is documented to return 0 on success. After this change,
it returns the number of bytes sent. None of the callers care, so
adjusting/removing the comment is enough.
Also, virSocketSendMsgWithFDs retries on EINTR. This should not do any
harm when called from virNetSocketSendFD, but you can also delete
the while (ret < 0 && errno == EINTR) wrapper from virFileOpenForked.
Replace the body of the former
with a call to the latter.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virsocket.c | 28 +++-------------------------
1 file changed, 3 insertions(+), 25 deletions(-)
With the comment adjusted to reflect the new return value:
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano