1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 15:44:57 +00:00

Kernel: Remove some unnecessary leaking of kernel pointers into dmesg

There's a lot more of this and we need to stop printing kernel pointers
anywhere but the debug console.
This commit is contained in:
Andreas Kling 2019-12-31 01:22:00 +01:00
parent 66d5ebafa6
commit 54d182f553
4 changed files with 11 additions and 8 deletions

View file

@ -2,6 +2,7 @@
#include <AK/StringBuilder.h>
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/DiskBackedFileSystem.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
@ -99,10 +100,14 @@ bool VFS::mount_root(NonnullRefPtr<FS>&& file_system)
}
m_root_inode = move(root_inode);
kprintf("VFS: mounted root on %s{%p}\n",
m_root_inode->fs().class_name(),
&m_root_inode->fs());
char device_name[32];
if (m_root_inode->fs().is_disk_backed()) {
auto& device = static_cast<DiskBackedFS&>(m_root_inode->fs()).device();
sprintf(device_name, "%d,%d", device.major(), device.minor());
} else {
sprintf(device_name, "not-a-disk");
}
kprintf("VFS: mounted root on %s (%s)\n", m_root_inode->fs().class_name(), device_name);
m_mounts.append(move(mount));
return true;