mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 11:45:11 +00:00
Everywhere: Replace a bundle of dbg with dbgln.
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
This commit is contained in:
parent
dd727d1fec
commit
c6ebca5b45
8 changed files with 68 additions and 106 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/Singleton.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
|
@ -75,9 +76,7 @@ LocalSocket::LocalSocket(int type)
|
|||
evaluate_block_conditions();
|
||||
});
|
||||
|
||||
#ifdef DEBUG_LOCAL_SOCKET
|
||||
dbg() << "LocalSocket{" << this << "} created with type=" << type;
|
||||
#endif
|
||||
dbgln<debug_local_socket>("LocalSocket({}) created with type={}", this, type);
|
||||
}
|
||||
|
||||
LocalSocket::~LocalSocket()
|
||||
|
@ -113,9 +112,7 @@ KResult LocalSocket::bind(Userspace<const sockaddr*> user_address, socklen_t add
|
|||
|
||||
auto path = String(address.sun_path, strnlen(address.sun_path, sizeof(address.sun_path)));
|
||||
|
||||
#ifdef DEBUG_LOCAL_SOCKET
|
||||
dbg() << "LocalSocket{" << this << "} bind(" << path << ")";
|
||||
#endif
|
||||
dbgln<debug_local_socket>("LocalSocket({}) bind({})", this, path);
|
||||
|
||||
mode_t mode = S_IFSOCK | (m_prebind_mode & 04777);
|
||||
UidAndGid owner { m_prebind_uid, m_prebind_gid };
|
||||
|
@ -159,9 +156,7 @@ KResult LocalSocket::connect(FileDescription& description, Userspace<const socka
|
|||
return EFAULT;
|
||||
safe_address[sizeof(safe_address) - 1] = '\0';
|
||||
|
||||
#ifdef DEBUG_LOCAL_SOCKET
|
||||
dbg() << "LocalSocket{" << this << "} connect(" << safe_address << ")";
|
||||
#endif
|
||||
dbgln<debug_local_socket>("LocalSocket({}) connect({})", this, safe_address);
|
||||
|
||||
auto description_or_error = VFS::the().open(safe_address, O_RDWR, 0, Process::current()->current_directory());
|
||||
if (description_or_error.is_error())
|
||||
|
@ -197,9 +192,7 @@ KResult LocalSocket::connect(FileDescription& description, Userspace<const socka
|
|||
return EINTR;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LOCAL_SOCKET
|
||||
dbg() << "LocalSocket{" << this << "} connect(" << safe_address << ") status is " << to_string(setup_state());
|
||||
#endif
|
||||
dbgln<debug_local_socket>("LocalSocket({}) connect({}) status is {}", this, safe_address, to_string(setup_state()));
|
||||
|
||||
if (!((u32)unblock_flags & (u32)Thread::FileDescriptionBlocker::BlockFlags::Connect)) {
|
||||
set_connect_side_role(Role::None);
|
||||
|
@ -218,9 +211,9 @@ KResult LocalSocket::listen(size_t backlog)
|
|||
auto previous_role = m_role;
|
||||
m_role = Role::Listener;
|
||||
set_connect_side_role(Role::Listener, previous_role != m_role);
|
||||
#ifdef DEBUG_LOCAL_SOCKET
|
||||
dbg() << "LocalSocket{" << this << "} listening with backlog=" << backlog;
|
||||
#endif
|
||||
|
||||
dbgln<debug_local_socket>("LocalSocket({}) listening with backlog={}", this, backlog);
|
||||
|
||||
return KSuccess;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue