diff options
author | dzwdz | 2022-06-29 21:52:15 +0200 |
---|---|---|
committer | dzwdz | 2022-06-29 21:52:15 +0200 |
commit | bf4cbc830d78774ac00d9501c45e8b84d0ae9ae7 (patch) | |
tree | f302f92badf74dade9e724e37f85d1ee2dd99833 /src/init/driver/ansiterm.c | |
parent | 43de6a4d8ead1e609828ef34ad1957d34c94ee6a (diff) |
kernel/vfs: add the OPEN_CREATE flag
Diffstat (limited to 'src/init/driver/ansiterm.c')
-rw-r--r-- | src/init/driver/ansiterm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/init/driver/ansiterm.c b/src/init/driver/ansiterm.c index 01ad984..60aad72 100644 --- a/src/init/driver/ansiterm.c +++ b/src/init/driver/ansiterm.c @@ -56,7 +56,7 @@ static void in_char(char c) { } void ansiterm_drv(void) { - vga_fd = _syscall_open("/vga", 4); + vga_fd = _syscall_open("/vga", 4, 0); _syscall_read(vga_fd, vga, sizeof vga, 0); // find first empty line @@ -78,6 +78,10 @@ void ansiterm_drv(void) { while (!_syscall_fs_wait(buf, sizeof buf, &res)) { switch (res.op) { case VFSOP_OPEN: + if (res.flags & OPEN_CREATE) { + _syscall_fs_respond(NULL, -1); + break; + } // TODO check path _syscall_fs_respond(NULL, 1); break; |