diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2021-02-07 15:33:24 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-08 18:08:55 +0100 |
commit | 09a43969ba957b3484cc9387344fea145f46aa46 (patch) | |
tree | 0e2077e1d8af02b06e39cb4ca6cbfcba37052c73 /Kernel/Syscalls | |
parent | 1f8a633cc762fc3ca8544ee75ce25a7a8860d4be (diff) | |
download | serenity-09a43969ba957b3484cc9387344fea145f46aa46.zip |
Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
Diffstat (limited to 'Kernel/Syscalls')
-rw-r--r-- | Kernel/Syscalls/fcntl.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/fork.cpp | 4 | ||||
-rw-r--r-- | Kernel/Syscalls/futex.cpp | 6 | ||||
-rw-r--r-- | Kernel/Syscalls/open.cpp | 4 | ||||
-rw-r--r-- | Kernel/Syscalls/read.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/select.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/waitid.cpp | 2 | ||||
-rw-r--r-- | Kernel/Syscalls/write.cpp | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/Kernel/Syscalls/fcntl.cpp b/Kernel/Syscalls/fcntl.cpp index c6a83cf85c..60e0ced3be 100644 --- a/Kernel/Syscalls/fcntl.cpp +++ b/Kernel/Syscalls/fcntl.cpp @@ -33,7 +33,7 @@ namespace Kernel { int Process::sys$fcntl(int fd, int cmd, u32 arg) { REQUIRE_PROMISE(stdio); - dbgln<IO_DEBUG>("sys$fcntl: fd={}, cmd={}, arg={}", fd, cmd, arg); + dbgln_if(IO_DEBUG, "sys$fcntl: fd={}, cmd={}, arg={}", fd, cmd, arg); auto description = file_description(fd); if (!description) return -EBADF; diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp index f20859dc5a..62287358c8 100644 --- a/Kernel/Syscalls/fork.cpp +++ b/Kernel/Syscalls/fork.cpp @@ -53,7 +53,7 @@ pid_t Process::sys$fork(RegisterState& regs) child->m_pg = m_pg; child->m_umask = m_umask; - dbgln<FORK_DEBUG>("fork: child={}", child); + dbgln_if(FORK_DEBUG, "fork: child={}", child); child->m_extra_gids = m_extra_gids; @@ -82,7 +82,7 @@ pid_t Process::sys$fork(RegisterState& regs) { ScopedSpinLock lock(m_lock); for (auto& region : m_regions) { - dbgln<FORK_DEBUG>("fork: cloning Region({}) '{}' @ {}", ®ion, region.name(), region.vaddr()); + dbgln_if(FORK_DEBUG, "fork: cloning Region({}) '{}' @ {}", ®ion, region.name(), region.vaddr()); auto region_clone = region.clone(*child); if (!region_clone) { dbgln("fork: Cannot clone region, insufficient memory"); diff --git a/Kernel/Syscalls/futex.cpp b/Kernel/Syscalls/futex.cpp index db312158fa..27763ea965 100644 --- a/Kernel/Syscalls/futex.cpp +++ b/Kernel/Syscalls/futex.cpp @@ -39,7 +39,7 @@ FutexQueue::FutexQueue(FlatPtr user_address_or_offset, VMObject* vmobject) : m_user_address_or_offset(user_address_or_offset) , m_is_global(vmobject != nullptr) { - dbgln<FUTEX_DEBUG>("Futex @ {}{}", + dbgln_if(FUTEX_DEBUG, "Futex @ {}{}", this, m_is_global ? " (global)" : " (local)"); @@ -56,7 +56,7 @@ FutexQueue::~FutexQueue() if (auto vmobject = m_vmobject.strong_ref()) vmobject->unregister_on_deleted_handler(*this); } - dbgln<FUTEX_DEBUG>("~Futex @ {}{}", + dbgln_if(FUTEX_DEBUG, "~Futex @ {}{}", this, m_is_global ? " (global)" : " (local)"); } @@ -68,7 +68,7 @@ void FutexQueue::vmobject_deleted(VMObject& vmobject) // to make sure we have at last a reference until we're done NonnullRefPtr<FutexQueue> own_ref(*this); - dbgln<FUTEX_DEBUG>("Futex::vmobject_deleted @ {}{}", + dbgln_if(FUTEX_DEBUG, "Futex::vmobject_deleted @ {}{}", this, m_is_global ? " (global)" : " (local)"); diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp index e42f04a98b..c84f5231c3 100644 --- a/Kernel/Syscalls/open.cpp +++ b/Kernel/Syscalls/open.cpp @@ -63,7 +63,7 @@ int Process::sys$open(Userspace<const Syscall::SC_open_params*> user_params) if (path.is_error()) return path.error(); - dbgln<IO_DEBUG>("sys$open(dirfd={}, path='{}', options={}, mode={})", dirfd, path.value(), options, mode); + dbgln_if(IO_DEBUG, "sys$open(dirfd={}, path='{}', options={}, mode={})", dirfd, path.value(), options, mode); int fd = alloc_fd(); if (fd < 0) return fd; @@ -99,7 +99,7 @@ int Process::sys$close(int fd) { REQUIRE_PROMISE(stdio); auto description = file_description(fd); - dbgln<IO_DEBUG>("sys$close({}) {}", fd, description.ptr()); + dbgln_if(IO_DEBUG, "sys$close({}) {}", fd, description.ptr()); if (!description) return -EBADF; int rc = description->close(); diff --git a/Kernel/Syscalls/read.cpp b/Kernel/Syscalls/read.cpp index 61744d0e26..0a1894a090 100644 --- a/Kernel/Syscalls/read.cpp +++ b/Kernel/Syscalls/read.cpp @@ -37,7 +37,7 @@ ssize_t Process::sys$read(int fd, Userspace<u8*> buffer, ssize_t size) return -EINVAL; if (size == 0) return 0; - dbgln<IO_DEBUG>("sys$read({}, {}, {})", fd, buffer.ptr(), size); + dbgln_if(IO_DEBUG, "sys$read({}, {}, {})", fd, buffer.ptr(), size); auto description = file_description(fd); if (!description) return -EBADF; diff --git a/Kernel/Syscalls/select.cpp b/Kernel/Syscalls/select.cpp index 6b0548a13b..2b46802e8a 100644 --- a/Kernel/Syscalls/select.cpp +++ b/Kernel/Syscalls/select.cpp @@ -99,7 +99,7 @@ int Process::sys$select(const Syscall::SC_select_params* user_params) dbgln("selecting on {} fds, timeout={}", fds_info.size(), params.timeout); if (current_thread->block<Thread::SelectBlocker>(timeout, fds_info).was_interrupted()) { - dbgln<POLL_SELECT_DEBUG>("select was interrupted"); + dbgln_if(POLL_SELECT_DEBUG, "select was interrupted"); return -EINTR; } diff --git a/Kernel/Syscalls/waitid.cpp b/Kernel/Syscalls/waitid.cpp index abba7c6f94..eeb471f947 100644 --- a/Kernel/Syscalls/waitid.cpp +++ b/Kernel/Syscalls/waitid.cpp @@ -55,7 +55,7 @@ pid_t Process::sys$waitid(Userspace<const Syscall::SC_waitid_params*> user_param if (!copy_from_user(¶ms, user_params)) return -EFAULT; - dbgln<PROCESS_DEBUG>("sys$waitid({}, {}, {}, {})", params.idtype, params.id, params.infop, params.options); + dbgln_if(PROCESS_DEBUG, "sys$waitid({}, {}, {}, {})", params.idtype, params.id, params.infop, params.options); auto siginfo_or_error = do_waitid(static_cast<idtype_t>(params.idtype), params.id, params.options); if (siginfo_or_error.is_error()) diff --git a/Kernel/Syscalls/write.cpp b/Kernel/Syscalls/write.cpp index f6aa4e9550..a2545d8469 100644 --- a/Kernel/Syscalls/write.cpp +++ b/Kernel/Syscalls/write.cpp @@ -125,7 +125,7 @@ ssize_t Process::sys$write(int fd, const u8* data, ssize_t size) if (size == 0) return 0; - dbgln<IO_DEBUG>("sys$write({}, {}, {})", fd, data, size); + dbgln_if(IO_DEBUG, "sys$write({}, {}, {})", fd, data, size); auto description = file_description(fd); if (!description) return -EBADF; |