diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-12-24 23:24:49 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-12-24 23:24:49 +0100 |
commit | 12a6963a5d8c6b382d42a12667cf1d0ac81b3f82 (patch) | |
tree | 8b92efa1e7a4616fefea40eef916c1cb02fc39b0 /Kernel | |
parent | 033a42b5803728404375f09e32366b31fc963115 (diff) | |
download | serenity-12a6963a5d8c6b382d42a12667cf1d0ac81b3f82.zip |
Fix bug where Vnode kept its Inode alive indefinitely.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/ProcFileSystem.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Kernel/ProcFileSystem.cpp b/Kernel/ProcFileSystem.cpp index b636a68bed..75c2c6c048 100644 --- a/Kernel/ProcFileSystem.cpp +++ b/Kernel/ProcFileSystem.cpp @@ -368,7 +368,10 @@ ByteBuffer procfs$vnodes() path = static_cast<const TTY*>(dev)->tty_name(); } } - ptr += ksprintf(ptr, "vnode %03u: %02u:%08u (%u) %s\n", i, vnode.inode.fsid(), vnode.inode.index(), vnode.retain_count(), path.characters()); + ptr += ksprintf(ptr, "vnode %03u: %02u:%08u (%u) %s", i, vnode.inode.fsid(), vnode.inode.index(), vnode.retain_count(), path.characters()); + if (vnode.characterDevice()) + ptr += ksprintf(ptr, " (chardev: %p)", vnode.characterDevice()); + ptr += ksprintf(ptr, "\n"); } *ptr = '\0'; buffer.trim(ptr - (char*)buffer.pointer()); |