From 8dc3d7df4c73b320fa84b2e871732276a7c6e20f Mon Sep 17 00:00:00 2001 From: dzwdz Date: Thu, 7 Jul 2022 18:34:47 +0200 Subject: shared: add a flags argument to _syscall_fs_respond --- src/init/tar.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/init/tar.c') diff --git a/src/init/tar.c b/src/init/tar.c index 0b8c7f6..dfb0396 100644 --- a/src/init/tar.c +++ b/src/init/tar.c @@ -22,10 +22,10 @@ void tar_driver(void *base) { 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, tar_open(buf, res.len, base, ~0)); + _syscall_fs_respond(NULL, tar_open(buf, res.len, base, ~0), 0); break; case VFSOP_READ: @@ -33,7 +33,7 @@ void tar_driver(void *base) { break; default: - _syscall_fs_respond(NULL, -1); // unsupported + _syscall_fs_respond(NULL, -1, 0); // unsupported break; } } @@ -76,9 +76,9 @@ static void tar_read(struct fs_wait_response *res, void *base, size_t base_len) size = tar_size(meta); if (res->offset < 0 || res->offset > size) { // TODO support negative offsets - _syscall_fs_respond(NULL, -1); + _syscall_fs_respond(NULL, -1, 0); } else { - _syscall_fs_respond(meta + 512 + res->offset, size - res->offset); + _syscall_fs_respond(meta + 512 + res->offset, size - res->offset, 0); } break; @@ -124,11 +124,11 @@ static void tar_read(struct fs_wait_response *res, void *base, size_t base_len) off += (size + 511) & ~511; // skip the data sectors } - _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; } } -- cgit v1.2.3