From bb40069773560e46690e9609bc1d9b3f7593efb4 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Wed, 14 Aug 2024 13:22:23 +0300 Subject: [PATCH] Kernel: Add nice debug prints for device addition/removal --- kernel/kernel/FS/DevFS/FileSystem.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/kernel/FS/DevFS/FileSystem.cpp b/kernel/kernel/FS/DevFS/FileSystem.cpp index 8db2b3d4..2f05440c 100644 --- a/kernel/kernel/FS/DevFS/FileSystem.cpp +++ b/kernel/kernel/FS/DevFS/FileSystem.cpp @@ -113,6 +113,8 @@ namespace Kernel ASSERT(!device->name().contains('/')); MUST(static_cast(root_inode().ptr())->link_inode(*device, device->name())); MUST(m_devices.push_back(device)); + + dprintln("Added device /dev/{}", device->name()); } void DevFileSystem::remove_device(BAN::RefPtr device) @@ -128,6 +130,8 @@ namespace Kernel break; } } + + dprintln("Removed device /dev/{}", device->name()); } void DevFileSystem::add_inode(BAN::StringView path, BAN::RefPtr inode)