Skip to content

Commit

Permalink
[LibOS] Add /dev/fd/ directory
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Kowalczyk <[email protected]>
  • Loading branch information
mkow committed May 9, 2024
1 parent fda2f87 commit 25056d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libos/src/fs/dev/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ int init_devfs(void) {
tty->dev.dev_ops.flush = &dev_tty_flush;
tty->dev.dev_ops.poll = &dev_tty_poll;

struct pseudo_node* fd_link = pseudo_add_link(root, "fd", NULL);
fd_link->link.target = "/proc/self/fd";

struct pseudo_node* stdin = pseudo_add_link(root, "stdin", NULL);
stdin->link.target = "/proc/self/fd/0";
struct pseudo_node* stdout = pseudo_add_link(root, "stdout", NULL);
Expand Down

0 comments on commit 25056d0

Please sign in to comment.