Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/test/readv.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ static void test(int mode) {
iovs[1].iov_len = sizeof(*part2);
if (mode == 1) {
/* Work around busted preadv prototype in older libcs */
nread = syscall(SYS_preadv, fd, iovs, 2, (off_t)0, 0);
nread = syscall(SYS_preadv, fd, iovs, 2, 0, 0);
} else if (mode == 2) {
nread = syscall(SYS_preadv2, fd, iovs, 2, (off_t)0, 0, 0);
nread = syscall(SYS_preadv2, fd, iovs, 2, 0, 0, 0);
} else {
test_assert(0 == lseek(fd, 0, SEEK_SET));
nread = readv(fd, iovs, 2);
Expand Down Expand Up @@ -65,7 +65,7 @@ int main(void) {
test_assert(0 == unlink("temp2"));
iov.iov_base = &buf;
iov.iov_len = 1;
ret = syscall(SYS_preadv2, fd, &iov, 1, (off_t)0, 0, 0x40000000);
ret = syscall(SYS_preadv2, fd, &iov, 1, 0, 0, 0x40000000);
test_assert(ret == -1 && errno == EINVAL);
close(fd);
}
Expand Down
8 changes: 4 additions & 4 deletions src/test/writev.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ static void test(int mode) {
iovs[1].iov_len = sizeof(data) - iovs[0].iov_len;
if (mode == 1) {
/* Work around busted pwritev prototype in older libcs */
nwritten = syscall(SYS_pwritev, fd, iovs, 2, (off_t)0, 0);
nwritten = syscall(SYS_pwritev, fd, iovs, 2, 0, 0);
} else if (mode == 2) {
nwritten = syscall(SYS_pwritev2, fd, iovs, 2, (off_t)0, 0, 0);
nwritten = syscall(SYS_pwritev2, fd, iovs, 2, 0, 0, 0);
} else {
nwritten = writev(fd, iovs, 2);
}
Expand Down Expand Up @@ -58,9 +58,9 @@ int main(void) {
test_assert(0 == unlink("temp2"));
iov.iov_base = &buf;
iov.iov_len = 1;
ret = syscall(SYS_pwritev2, fd, &iov, 1, (off_t)0, 0, 0x10 /*RWF_APPEND*/);
ret = syscall(SYS_pwritev2, fd, &iov, 1, 0, 0, 0x10 /*RWF_APPEND*/);
test_assert(ret == -1 && errno == EINVAL);
ret = syscall(SYS_pwritev2, fd, &iov, 1, (off_t)0, 0, 0x40000000);
ret = syscall(SYS_pwritev2, fd, &iov, 1, 0, 0, 0x40000000);
test_assert(ret == -1 && errno == EINVAL);
close(fd);
}
Expand Down
Loading