summaryrefslogtreecommitdiff
path: root/src/init/driver
diff options
context:
space:
mode:
Diffstat (limited to 'src/init/driver')
-rw-r--r--src/init/driver/ansiterm.c6
-rw-r--r--src/init/driver/ps2.c6
2 files changed, 10 insertions, 2 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;
diff --git a/src/init/driver/ps2.c b/src/init/driver/ps2.c
index b2d42e5..0c6d548 100644
--- a/src/init/driver/ps2.c
+++ b/src/init/driver/ps2.c
@@ -51,6 +51,10 @@ static void main_loop(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;
+ }
_syscall_fs_respond(NULL, 1);
break;
@@ -74,7 +78,7 @@ static void main_loop(void) {
}
void ps2_drv(void) {
- fd = _syscall_open("/ps2", 4);
+ fd = _syscall_open("/ps2", 4, 0);
if (fd < 0) _syscall_exit(1);
main_loop();