mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 19:47:36 +00:00
CIODevice: Update m_error if a write() fails.
This commit is contained in:
parent
c02b8b715d
commit
ae4ac524ad
1 changed files with 1 additions and 0 deletions
|
@ -208,6 +208,7 @@ bool CIODevice::write(const byte* data, int size)
|
||||||
int rc = ::write(m_fd, data, size);
|
int rc = ::write(m_fd, data, size);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
perror("CIODevice::write: write");
|
perror("CIODevice::write: write");
|
||||||
|
set_error(errno);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return rc == size;
|
return rc == size;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue