From cf33d0b5f785486699b7c63416f30215e2bb8a63 Mon Sep 17 00:00:00 2001 From: Liav A Date: Sat, 6 Aug 2022 17:40:07 +0300 Subject: [PATCH] Kernel/FileSystem: Use a new debug flag for SysFS debug messages --- Kernel/Debug.h.in | 4 ++++ .../FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp | 2 +- Meta/CMake/all_the_debug_macros.cmake | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Kernel/Debug.h.in b/Kernel/Debug.h.in index 6ae13d54aa..04f814867b 100644 --- a/Kernel/Debug.h.in +++ b/Kernel/Debug.h.in @@ -303,6 +303,10 @@ #cmakedefine01 STORAGE_DEVICE_DEBUG #endif +#ifndef SYSFS_DEBUG +#cmakedefine01 SYSFS_DEBUG +#endif + #ifndef TCP_DEBUG #cmakedefine01 TCP_DEBUG #endif diff --git a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp index 991dac7272..d4018a2d02 100644 --- a/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp +++ b/Kernel/FileSystem/SysFS/Subsystems/Bus/USB/DeviceInformation.cpp @@ -115,7 +115,7 @@ ErrorOr SysFSUSBDeviceInformation::refresh_data(OpenFileDescription& descr ErrorOr SysFSUSBDeviceInformation::read_bytes(off_t offset, size_t count, UserOrKernelBuffer& buffer, OpenFileDescription* description) const { - dbgln_if(PROCFS_DEBUG, "SysFSUSBDeviceInformation @ {}: read_bytes offset: {} count: {}", name(), offset, count); + dbgln_if(SYSFS_DEBUG, "SysFSUSBDeviceInformation @ {}: read_bytes offset: {} count: {}", name(), offset, count); VERIFY(offset >= 0); VERIFY(buffer.user_or_kernel_ptr()); diff --git a/Meta/CMake/all_the_debug_macros.cmake b/Meta/CMake/all_the_debug_macros.cmake index a2012d80c9..90924fbc33 100644 --- a/Meta/CMake/all_the_debug_macros.cmake +++ b/Meta/CMake/all_the_debug_macros.cmake @@ -177,6 +177,7 @@ set(SQLSERVER_DEBUG ON) set(STORAGE_DEVICE_DEBUG ON) set(SYNTAX_HIGHLIGHTING_DEBUG ON) set(SYSCALL_1_DEBUG ON) +set(SYSFS_DEBUG ON) set(SYSTEM_MENU_DEBUG ON) set(SYSTEMSERVER_DEBUG ON) set(TCP_DEBUG ON)