Kernel: Add nice debug prints for device addition/removal

This commit is contained in:
Bananymous 2024-08-14 13:22:23 +03:00
parent 37d5b60f5c
commit bb40069773
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,8 @@ namespace Kernel
ASSERT(!device->name().contains('/')); ASSERT(!device->name().contains('/'));
MUST(static_cast<TmpDirectoryInode*>(root_inode().ptr())->link_inode(*device, device->name())); MUST(static_cast<TmpDirectoryInode*>(root_inode().ptr())->link_inode(*device, device->name()));
MUST(m_devices.push_back(device)); MUST(m_devices.push_back(device));
dprintln("Added device /dev/{}", device->name());
} }
void DevFileSystem::remove_device(BAN::RefPtr<Device> device) void DevFileSystem::remove_device(BAN::RefPtr<Device> device)
@ -128,6 +130,8 @@ namespace Kernel
break; break;
} }
} }
dprintln("Removed device /dev/{}", device->name());
} }
void DevFileSystem::add_inode(BAN::StringView path, BAN::RefPtr<TmpInode> inode) void DevFileSystem::add_inode(BAN::StringView path, BAN::RefPtr<TmpInode> inode)