From f229b2e8a6ca840af8f3ac26cc2f412891a99a5e Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 5 Sep 2021 15:32:00 +0200 Subject: root vfs: implement writing to /tty --- src/shared/vfs.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/shared') diff --git a/src/shared/vfs.h b/src/shared/vfs.h index 1d4812d..d88c424 100644 --- a/src/shared/vfs.h +++ b/src/shared/vfs.h @@ -5,8 +5,12 @@ enum vfs_op_types { VFSOP_OPEN, + VFSOP_WRITE, }; +/* currently, this struct is fully created in kernelspace + * i might add a syscall which allows a process to just pass it raw, with some + * validation - so keep that in mind */ struct vfs_op { enum vfs_op_types type; union { @@ -14,5 +18,10 @@ struct vfs_op { const char *path; int path_len; } open; + struct { + user_ptr buf; + int buf_len; + int id; // filled in by the kernel + } rw; }; }; -- cgit v1.2.3