summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/ProcFS.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2021-01-23 23:59:27 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-25 09:47:36 +0100
commit8465683dcf1ede4dbab46915113dd2ce4e4b7dfb (patch)
tree392cdf423fabec6af5550d831e07217fd0e3287b /Kernel/FileSystem/ProcFS.cpp
parentbb483f7ef4693582d34aa7a30fa2916fdcc8b6f4 (diff)
downloadserenity-8465683dcf1ede4dbab46915113dd2ce4e4b7dfb.zip
Everywhere: Debug macros instead of constexpr.
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
Diffstat (limited to 'Kernel/FileSystem/ProcFS.cpp')
-rw-r--r--Kernel/FileSystem/ProcFS.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp
index d2eacf4e52..45c5632407 100644
--- a/Kernel/FileSystem/ProcFS.cpp
+++ b/Kernel/FileSystem/ProcFS.cpp
@@ -986,7 +986,7 @@ NonnullRefPtr<Inode> ProcFS::root_inode() const
RefPtr<Inode> ProcFS::get_inode(InodeIdentifier inode_id) const
{
- dbgln<debug_procfs>("ProcFS::get_inode({})", inode_id.index());
+ dbgln<PROCFS_DEBUG>("ProcFS::get_inode({})", inode_id.index());
if (inode_id == root_inode()->identifier())
return m_root_inode;
@@ -1099,7 +1099,7 @@ void ProcFSInode::did_seek(FileDescription& description, off_t new_offset)
InodeMetadata ProcFSInode::metadata() const
{
- dbgln<debug_procfs>("ProcFSInode::metadata({})", index());
+ dbgln<PROCFS_DEBUG>("ProcFSInode::metadata({})", index());
InodeMetadata metadata;
metadata.inode = identifier();
metadata.ctime = mepoch;
@@ -1108,7 +1108,7 @@ InodeMetadata ProcFSInode::metadata() const
auto proc_parent_directory = to_proc_parent_directory(identifier());
auto proc_file_type = to_proc_file_type(identifier());
- dbgln<debug_procfs>(" -> pid={}, fi={}, pdi={}", to_pid(identifier()).value(), (int)proc_file_type, (int)proc_parent_directory);
+ dbgln<PROCFS_DEBUG>(" -> pid={}, fi={}, pdi={}", to_pid(identifier()).value(), (int)proc_file_type, (int)proc_parent_directory);
if (is_process_related_file(identifier())) {
ProcessID pid = to_pid(identifier());
@@ -1173,14 +1173,14 @@ InodeMetadata ProcFSInode::metadata() const
ssize_t ProcFSInode::read_bytes(off_t offset, ssize_t count, UserOrKernelBuffer& buffer, FileDescription* description) const
{
- dbgln<debug_procfs>("ProcFS: read_bytes offset: {} count: {}", offset, count);
+ dbgln<PROCFS_DEBUG>("ProcFS: read_bytes offset: {} count: {}", offset, count);
ASSERT(offset >= 0);
ASSERT(buffer.user_or_kernel_ptr());
if (!description)
return -EIO;
if (!description->data()) {
- dbgln<debug_procfs>("ProcFS: Do not have cached data!");
+ dbgln<PROCFS_DEBUG>("ProcFS: Do not have cached data!");
return -EIO;
}
@@ -1204,7 +1204,7 @@ InodeIdentifier ProcFS::ProcFSDirectoryEntry::identifier(unsigned fsid) const
KResult ProcFSInode::traverse_as_directory(Function<bool(const FS::DirectoryEntryView&)> callback) const
{
- dbgln<debug_procfs>("ProcFS: traverse_as_directory {}", index());
+ dbgln<PROCFS_DEBUG>("ProcFS: traverse_as_directory {}", index());
if (!Kernel::is_directory(identifier()))
return ENOTDIR;