diff options
author | asynts <asynts@gmail.com> | 2021-01-15 00:18:55 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-22 22:14:30 +0100 |
commit | 7b0a1a98d9edc5ae91df9138b695fb2bb3ead4b7 (patch) | |
tree | 460a80e34939ad908e27412bd123d733866784a2 /Kernel/Syscalls/open.cpp | |
parent | a348ab55b038386bd2d0acc0c8de1c8927de12fe (diff) | |
download | serenity-7b0a1a98d9edc5ae91df9138b695fb2bb3ead4b7.zip |
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.
Diffstat (limited to 'Kernel/Syscalls/open.cpp')
-rw-r--r-- | Kernel/Syscalls/open.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Kernel/Syscalls/open.cpp b/Kernel/Syscalls/open.cpp index abcc413f01..8da12548a6 100644 --- a/Kernel/Syscalls/open.cpp +++ b/Kernel/Syscalls/open.cpp @@ -24,6 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <AK/Debug.h> #include <Kernel/FileSystem/Custody.h> #include <Kernel/FileSystem/FileDescription.h> #include <Kernel/FileSystem/VirtualFileSystem.h> @@ -61,9 +62,8 @@ int Process::sys$open(Userspace<const Syscall::SC_open_params*> user_params) auto path = get_syscall_path_argument(params.path); if (path.is_error()) return path.error(); -#ifdef DEBUG_IO - dbg() << "sys$open(dirfd=" << dirfd << ", path=\"" << path.value() << "\", options=" << options << ", mode=" << mode << ")"; -#endif + + dbgln<debug_io>("sys$open(dirfd={}, path='{}', options={}, mode={})", dirfd, path.value(), options, mode); int fd = alloc_fd(); if (fd < 0) return fd; @@ -99,9 +99,7 @@ int Process::sys$close(int fd) { REQUIRE_PROMISE(stdio); auto description = file_description(fd); -#ifdef DEBUG_IO - dbg() << "sys$close(" << fd << ") " << description.ptr(); -#endif + dbgln<debug_io>("sys$close({}) {}", fd, description.ptr()); if (!description) return -EBADF; int rc = description->close(); |