1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:18:12 +00:00

Kernel: Remove /proc/mounts

Everyone was already using /proc/df which has all the info anyway.
This commit is contained in:
Andreas Kling 2021-01-11 23:00:07 +01:00
parent 9b907e27ce
commit 6412e7e8e3

View file

@ -82,7 +82,6 @@ enum ProcFileType {
__FI_Root_Start,
FI_Root_mm,
FI_Root_mounts,
FI_Root_df,
FI_Root_all,
FI_Root_memstat,
@ -698,24 +697,6 @@ static bool procfs$dmesg(InodeIdentifier, KBufferBuilder& builder)
return true;
}
static bool procfs$mounts(InodeIdentifier, KBufferBuilder& builder)
{
// FIXME: This is obviously racy against the VFS mounts changing.
VFS::the().for_each_mount([&builder](auto& mount) {
auto& fs = mount.guest_fs();
builder.appendf("%s @ ", fs.class_name());
if (mount.host() == nullptr)
builder.appendf("/");
else {
builder.appendf("%u:%u", mount.host()->fsid(), mount.host()->index());
builder.append(' ');
builder.append(mount.absolute_path());
}
builder.append('\n');
});
return true;
}
static bool procfs$df(InodeIdentifier, KBufferBuilder& builder)
{
// FIXME: This is obviously racy against the VFS mounts changing.
@ -1706,7 +1687,6 @@ ProcFS::ProcFS()
m_root_inode = adopt(*new ProcFSInode(*this, 1));
m_entries.resize(FI_MaxStaticFileIndex);
m_entries[FI_Root_mm] = { "mm", FI_Root_mm, true, procfs$mm };
m_entries[FI_Root_mounts] = { "mounts", FI_Root_mounts, false, procfs$mounts };
m_entries[FI_Root_df] = { "df", FI_Root_df, false, procfs$df };
m_entries[FI_Root_all] = { "all", FI_Root_all, false, procfs$all };
m_entries[FI_Root_memstat] = { "memstat", FI_Root_memstat, false, procfs$memstat };