Kernel: Turn Process::FileDescriptionAndFlags into a proper class

This commit is contained in:
Andreas Kling 2020-07-30 23:50:31 +02:00
commit 2e2de125e5
Notes: sideshowbarker 2024-07-19 04:27:15 +09:00
8 changed files with 34 additions and 24 deletions

View file

@ -46,12 +46,12 @@ int Process::sys$pipe(int pipefd[2], int flags)
int reader_fd = alloc_fd();
m_fds[reader_fd].set(fifo->open_direction(FIFO::Direction::Reader), fd_flags);
m_fds[reader_fd].description->set_readable(true);
m_fds[reader_fd].description()->set_readable(true);
copy_to_user(&pipefd[0], &reader_fd);
int writer_fd = alloc_fd();
m_fds[writer_fd].set(fifo->open_direction(FIFO::Direction::Writer), fd_flags);
m_fds[writer_fd].description->set_writable(true);
m_fds[writer_fd].description()->set_writable(true);
copy_to_user(&pipefd[1], &writer_fd);
return 0;