Kernel: Expose inode information in /proc/pid/fds

This commit is contained in:
Ben Wiederhake 2021-11-06 22:35:05 +01:00 committed by Andreas Kling
parent 657409736a
commit 3582184d8c
Notes: sideshowbarker 2024-07-18 01:25:26 +09:00

View file

@ -198,6 +198,13 @@ KResult Process::procfs_get_fds_stats(KBufferBuilder& builder) const
description_object.add("blocking", description->is_blocking());
description_object.add("can_read", description->can_read());
description_object.add("can_write", description->can_write());
Inode* inode = description->inode();
if (inode != nullptr) {
auto inode_object = description_object.add_object("inode");
inode_object.add("fsid", inode->fsid());
inode_object.add("index", inode->index().value());
inode_object.finish();
}
count++;
});