From 0da663e05c93f2791d7166ece8d69a1be06a7924 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 25 Aug 2021 14:49:58 +0200 Subject: implement open() for FD_SPECIAL_TTY (`/tty`) --- src/kernel/fd.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/kernel/fd.h') diff --git a/src/kernel/fd.h b/src/kernel/fd.h index bcc9902..c7c5182 100644 --- a/src/kernel/fd.h +++ b/src/kernel/fd.h @@ -18,6 +18,8 @@ struct fd { enum fdop { // describes the operations which can be done on file descriptors FDOP_MOUNT, // also closes the original fd + FDOP_OPEN, // when the file descriptor is mounted, open a file relative to it + FDOP_READ, FDOP_WRITE, FDOP_CLOSE, @@ -30,6 +32,11 @@ struct fdop_args { struct { // FDOP_MOUNT struct mount *target; } mnt; + struct { // FDOP_OPEN + struct fd *target; + const char *path; // relative to the mount point + size_t len; + } open; struct { // FDOP_READ, FDOP_WRITE user_ptr ptr; size_t len; -- cgit v1.2.3