mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:47:46 +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
27bc48e06c
commit
9229ba0fe9
14 changed files with 130 additions and 80 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/LogStream.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
#include <errno.h>
|
||||
|
@ -41,10 +42,11 @@ inline int safe_syscall(Syscall syscall, Args&&... args)
|
|||
for (;;) {
|
||||
int sysret = syscall(forward<Args>(args)...);
|
||||
if (sysret == -1) {
|
||||
#ifdef SAFE_SYSCALL_DEBUG
|
||||
int saved_errno = errno;
|
||||
dbg() << "Core::safe_syscall: " << sysret << " (" << saved_errno << ": " << strerror(saved_errno) << ")";
|
||||
#endif
|
||||
if constexpr (debug_safe_syscall) {
|
||||
int saved_errno = errno;
|
||||
dbgln<debug_safe_syscall>("Core::safe_syscall: {} ({}: {})", sysret, saved_errno, strerror(saved_errno));
|
||||
}
|
||||
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
ASSERT_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue