mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
syscalls: random fixes
This commit is contained in:
@@ -48,11 +48,11 @@ syscallret_t syscall_poll(context_t *, pollfd_t *fds, size_t nfds, int timeoutms
|
||||
size_t eventcount = 0;
|
||||
|
||||
for (uintmax_t i = 0; i < nfds; ++i) {
|
||||
fdsbuff[i].revents = 0;
|
||||
|
||||
// negative fds are ignored and return nothing
|
||||
if (fdsbuff[i].fd < 0) {
|
||||
fdsbuff[i].revents = 0;
|
||||
if (fdsbuff[i].fd < 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
file_t *file = fd_get(fdsbuff[i].fd);
|
||||
if (file == NULL) {
|
||||
|
||||
@@ -10,6 +10,11 @@ syscallret_t syscall_utimensat(context_t *, int fd, char *upath, timespec_t uts[
|
||||
.ret = -1
|
||||
};
|
||||
|
||||
if (flags != 0) {
|
||||
ret.errno = EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
timespec_t ts[2];
|
||||
if (uts == NULL)
|
||||
ts[0] = ts[1] = timekeeper_time();
|
||||
|
||||
Reference in New Issue
Block a user