Kernel: Use KResultOr and TRY() for FIFO

This commit is contained in:
Andreas Kling 2021-09-07 13:56:10 +02:00
parent 631b8e90cd
commit ed5d04b0ea
Notes: sideshowbarker 2024-07-18 04:31:39 +09:00
6 changed files with 10 additions and 18 deletions

View file

@ -250,7 +250,7 @@ KResultOr<NonnullRefPtr<OpenFileDescription>> VirtualFileSystem::open(StringView
return *preopen_fd;
if (metadata.is_fifo()) {
auto fifo = inode.fifo();
auto fifo = TRY(inode.fifo());
if (options & O_WRONLY) {
auto description = TRY(fifo->open_direction_blocking(FIFO::Direction::Writer));
description->set_rw_mode(options);