CIODevice: Update m_error if a write() fails.

This commit is contained in:
Andreas Kling 2019-06-02 15:18:27 +02:00
parent c02b8b715d
commit ae4ac524ad
Notes: sideshowbarker 2024-07-19 13:46:10 +09:00

View file

@ -208,6 +208,7 @@ bool CIODevice::write(const byte* data, int size)
int rc = ::write(m_fd, data, size);
if (rc < 0) {
perror("CIODevice::write: write");
set_error(errno);
return false;
}
return rc == size;