mirror of
https://github.com/RGBCube/serenity
synced 2025-07-22 21:57:35 +00:00
CIODevice: printf() thought it was calling ::write() but it was write()
There's some confusion between the write syscall and CIODevice::write() here. The internal write() returns a boolean, and has already whined in case the syscall failed, so we don't need to do that again.
This commit is contained in:
parent
b9c8b3137d
commit
385e9268f4
1 changed files with 1 additions and 3 deletions
|
@ -249,9 +249,7 @@ int CIODevice::printf(const char* format, ...)
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
// FIXME: We're not propagating write() failures to client here!
|
// FIXME: We're not propagating write() failures to client here!
|
||||||
int ret = printf_internal([this](char*&, char ch) {
|
int ret = printf_internal([this](char*&, char ch) {
|
||||||
int rc = write((const u8*)&ch, 1);
|
write((const u8*)&ch, 1);
|
||||||
if (rc < 0)
|
|
||||||
dbgprintf("CIODevice::printf: write: %s\n", strerror(errno));
|
|
||||||
},
|
},
|
||||||
nullptr, format, ap);
|
nullptr, format, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue