1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:55:06 +00:00

Kernel: Use klog() instead of kprintf()

Also, duplicate data in dbg() and klog() calls were removed.
In addition, leakage of virtual address to kernel log is prevented.
This is done by replacing kprintf() calls to dbg() calls with the
leaked data instead.
Also, other kprintf() calls were replaced with klog().
This commit is contained in:
Liav A 2020-03-01 21:45:39 +02:00 committed by Andreas Kling
parent 19aa53e1f9
commit 0fc60e41dd
53 changed files with 397 additions and 573 deletions

View file

@ -65,7 +65,7 @@ Socket::~Socket()
void Socket::set_setup_state(SetupState new_setup_state)
{
#ifdef SOCKET_DEBUG
kprintf("%s(%u) Socket{%p} setup state moving from %s to %s\n", Process::current->name().characters(), Process::current->pid(), this, to_string(m_setup_state), to_string(new_setup_state));
dbg() << "Socket{" << this << "} setup state moving from " << to_string(m_setup_state) << " to " << to_string(new_setup_state);
#endif
m_setup_state = new_setup_state;
@ -77,7 +77,7 @@ RefPtr<Socket> Socket::accept()
if (m_pending.is_empty())
return nullptr;
#ifdef SOCKET_DEBUG
kprintf("%s(%u) Socket{%p} de-queueing connection\n", Process::current->name().characters(), Process::current->pid(), this);
dbg() << "Socket{" << this << "} de-queueing connection";
#endif
auto client = m_pending.take_first();
ASSERT(!client->is_connected());
@ -91,7 +91,7 @@ RefPtr<Socket> Socket::accept()
KResult Socket::queue_connection_from(NonnullRefPtr<Socket> peer)
{
#ifdef SOCKET_DEBUG
kprintf("%s(%u) Socket{%p} queueing connection\n", Process::current->name().characters(), Process::current->pid(), this);
dbg() << "Socket{" << this << "} queueing connection";
#endif
LOCKER(m_lock);
if (m_pending.size() >= m_backlog)