From c67d550df116346733e6652aff47972a8dfadcc2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 9 Mar 2021 22:25:09 +0100 Subject: Kernel: Convert klog() => dmesgln() in IPv4Socket --- Kernel/Net/IPv4Socket.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'Kernel/Net/IPv4Socket.cpp') diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp index 3313ea4e75..9baac7312e 100644 --- a/Kernel/Net/IPv4Socket.cpp +++ b/Kernel/Net/IPv4Socket.cpp @@ -203,7 +203,7 @@ KResultOr IPv4Socket::sendto(FileDescription&, const UserOrKernelBuffer& return EFAULT; if (ia.sin_family != AF_INET) { - klog() << "sendto: Bad address family: " << ia.sin_family << " is not AF_INET!"; + dmesgln("sendto: Bad address family: {} is not AF_INET", ia.sin_family); return EAFNOSUPPORT; } @@ -222,9 +222,7 @@ KResultOr IPv4Socket::sendto(FileDescription&, const UserOrKernelBuffer& if (rc < 0) return rc; -#if IPV4_SOCKET_DEBUG - klog() << "sendto: destination=" << m_peer_address.to_string().characters() << ":" << m_peer_port; -#endif + dbgln_if(IPV4_SOCKET_DEBUG, "sendto: destination={}:{}", m_peer_address, m_peer_port); if (type() == SOCK_RAW) { auto result = routing_decision.adapter->send_ipv4(routing_decision.next_hop, m_peer_address, (IPv4Protocol)protocol(), data, data_length, m_ttl); @@ -364,9 +362,7 @@ KResultOr IPv4Socket::recvfrom(FileDescription& description, UserOrKerne return EINVAL; } -#if IPV4_SOCKET_DEBUG - klog() << "recvfrom: type=" << type() << ", local_port=" << local_port(); -#endif + dbgln_if(IPV4_SOCKET_DEBUG, "recvfrom: type={}, local_port={}", type(), local_port()); KResultOr nreceived = 0; if (buffer_mode() == BufferMode::Bytes) -- cgit v1.2.3