mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +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;
|
size_t eventcount = 0;
|
||||||
|
|
||||||
for (uintmax_t i = 0; i < nfds; ++i) {
|
for (uintmax_t i = 0; i < nfds; ++i) {
|
||||||
|
fdsbuff[i].revents = 0;
|
||||||
|
|
||||||
// negative fds are ignored and return nothing
|
// negative fds are ignored and return nothing
|
||||||
if (fdsbuff[i].fd < 0) {
|
if (fdsbuff[i].fd < 0)
|
||||||
fdsbuff[i].revents = 0;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
file_t *file = fd_get(fdsbuff[i].fd);
|
file_t *file = fd_get(fdsbuff[i].fd);
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ syscallret_t syscall_utimensat(context_t *, int fd, char *upath, timespec_t uts[
|
|||||||
.ret = -1
|
.ret = -1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (flags != 0) {
|
||||||
|
ret.errno = EINVAL;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
timespec_t ts[2];
|
timespec_t ts[2];
|
||||||
if (uts == NULL)
|
if (uts == NULL)
|
||||||
ts[0] = ts[1] = timekeeper_time();
|
ts[0] = ts[1] = timekeeper_time();
|
||||||
|
|||||||
Reference in New Issue
Block a user