1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 11:55:08 +00:00

Kernel: Make it possible to look up FIFO's by ID.

This will be useful when implementing the /proc/PID/fd/N links where N is
a file descriptor referring to a FIFO.
This commit is contained in:
Andreas Kling 2019-04-25 13:52:07 +02:00
parent eadcf720c0
commit d5578826af
4 changed files with 43 additions and 8 deletions

View file

@ -402,7 +402,7 @@ KResultOr<String> FileDescriptor::absolute_path()
if (is_tty())
return tty()->tty_name();
if (is_fifo())
return String::format("fifo:%x", m_fifo.ptr());
return String::format("fifo:%u", m_fifo.ptr());
if (is_device())
return String::format("device:%u,%u (%s)", m_device->major(), m_device->minor(), m_device->class_name());
if (is_socket())