1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 17:47:43 +00:00

FIFO: Use dbg() instead of dbgprintf()

This commit is contained in:
Liav A 2020-02-24 17:16:26 +02:00 committed by Andreas Kling
parent 31a67ca2f9
commit 03592a80fc

View file

@ -120,11 +120,11 @@ ssize_t FIFO::read(FileDescription&, u8* buffer, ssize_t size)
if (!m_writers && m_buffer.is_empty()) if (!m_writers && m_buffer.is_empty())
return 0; return 0;
#ifdef FIFO_DEBUG #ifdef FIFO_DEBUG
dbgprintf("fifo: read(%u)\n", size); dbg() << "fifo: read(" << size << ")\n";
#endif #endif
ssize_t nread = m_buffer.read(buffer, size); ssize_t nread = m_buffer.read(buffer, size);
#ifdef FIFO_DEBUG #ifdef FIFO_DEBUG
dbgprintf(" -> read (%c) %u\n", buffer[0], nread); dbg() << " -> read (" << String::format("%c", buffer[0]) << ") " << nread;
#endif #endif
return nread; return nread;
} }
@ -136,7 +136,7 @@ ssize_t FIFO::write(FileDescription&, const u8* buffer, ssize_t size)
return -EPIPE; return -EPIPE;
} }
#ifdef FIFO_DEBUG #ifdef FIFO_DEBUG
dbgprintf("fifo: write(%p, %u)\n", buffer, size); dbg() << "fifo: write(" << String::format("%p", buffer) << ", " << size << ")";
#endif #endif
return m_buffer.write(buffer, size); return m_buffer.write(buffer, size);
} }