diff options
author | dzwdz | 2022-07-07 18:34:47 +0200 |
---|---|---|
committer | dzwdz | 2022-07-07 18:34:47 +0200 |
commit | 8dc3d7df4c73b320fa84b2e871732276a7c6e20f (patch) | |
tree | 8c0eae523e8349cdf7763e5deacd6b5e10c85f61 /src/init/driver | |
parent | b935b0202ffeafcf775be96c95c8a67b62241a12 (diff) |
shared: add a flags argument to _syscall_fs_respond
Diffstat (limited to 'src/init/driver')
-rw-r--r-- | src/init/driver/ansiterm.c | 8 | ||||
-rw-r--r-- | src/init/driver/ps2.c | 8 | ||||
-rw-r--r-- | src/init/driver/tmpfs.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/init/driver/ansiterm.c b/src/init/driver/ansiterm.c index 2d8ef1f..4d98972 100644 --- a/src/init/driver/ansiterm.c +++ b/src/init/driver/ansiterm.c @@ -79,22 +79,22 @@ void ansiterm_drv(void) { switch (res.op) { case VFSOP_OPEN: if (res.flags & OPEN_CREATE) { - _syscall_fs_respond(NULL, -1); + _syscall_fs_respond(NULL, -1, 0); break; } // TODO check path - _syscall_fs_respond(NULL, 1); + _syscall_fs_respond(NULL, 1, 0); break; case VFSOP_WRITE: for (size_t i = 0; i < res.len; i++) in_char(buf[i]); /* if (pendingFlush) */ flush(); - _syscall_fs_respond(NULL, res.len); + _syscall_fs_respond(NULL, res.len, 0); break; default: - _syscall_fs_respond(NULL, -1); + _syscall_fs_respond(NULL, -1, 0); break; } } diff --git a/src/init/driver/ps2.c b/src/init/driver/ps2.c index 5623b98..d01c522 100644 --- a/src/init/driver/ps2.c +++ b/src/init/driver/ps2.c @@ -56,10 +56,10 @@ static void main_loop(void) { switch (res.op) { case VFSOP_OPEN: if (res.flags & OPEN_CREATE) { - _syscall_fs_respond(NULL, -1); + _syscall_fs_respond(NULL, -1, 0); break; } - _syscall_fs_respond(NULL, 1); + _syscall_fs_respond(NULL, 1, 0); break; case VFSOP_READ: @@ -71,11 +71,11 @@ static void main_loop(void) { parse_scancode(buf[i]); } ret = ring_get((void*)&backlog, buf, res.capacity); - _syscall_fs_respond(buf, ret); + _syscall_fs_respond(buf, ret, 0); break; default: - _syscall_fs_respond(NULL, -1); + _syscall_fs_respond(NULL, -1, 0); break; } } diff --git a/src/init/driver/tmpfs.c b/src/init/driver/tmpfs.c index 17b5b9b..4b639da 100644 --- a/src/init/driver/tmpfs.c +++ b/src/init/driver/tmpfs.c @@ -51,13 +51,13 @@ void tmpfs_drv(void) { while (!_syscall_fs_wait(buf, sizeof buf, &res)) { switch (res.op) { case VFSOP_OPEN: - _syscall_fs_respond(NULL, tmpfs_open(buf, &res)); + _syscall_fs_respond(NULL, tmpfs_open(buf, &res), 0); break; case VFSOP_READ: if (res.id != 0) { // rw unimplemented - _syscall_fs_respond(NULL, -1); + _syscall_fs_respond(NULL, -1, 0); break; } size_t buf_pos = 0; @@ -79,11 +79,11 @@ void tmpfs_drv(void) { buf[buf_pos++] = '\0'; to_skip = 0; } - _syscall_fs_respond(buf, buf_pos); + _syscall_fs_respond(buf, buf_pos, 0); break; default: - _syscall_fs_respond(NULL, -1); + _syscall_fs_respond(NULL, -1, 0); break; } } |