Fix poll() to only update revents.
This commit is contained in:
parent
4fa477c039
commit
67f991e452
@ -1,6 +1,7 @@
|
|||||||
#include "soc_common.h"
|
#include "soc_common.h"
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
int poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
int poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
||||||
{
|
{
|
||||||
@ -47,7 +48,7 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
|||||||
saved_threadstorage[1] = cmdbuf[0x104>>2];
|
saved_threadstorage[1] = cmdbuf[0x104>>2];
|
||||||
|
|
||||||
cmdbuf[0x100>>2] = (size<<14) | 2;
|
cmdbuf[0x100>>2] = (size<<14) | 2;
|
||||||
cmdbuf[0x104>>2] = (u32)fds;
|
cmdbuf[0x104>>2] = (u32)tmp_fds;
|
||||||
|
|
||||||
if((ret = svcSendSyncRequest(SOCU_handle)) != 0)
|
if((ret = svcSendSyncRequest(SOCU_handle)) != 0)
|
||||||
{
|
{
|
||||||
@ -55,6 +56,11 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(i = 0; i < nfds; ++i)
|
||||||
|
{
|
||||||
|
fds[i].revents = tmp_fds[i].revents;
|
||||||
|
}
|
||||||
|
|
||||||
free(tmp_fds);
|
free(tmp_fds);
|
||||||
|
|
||||||
cmdbuf[0x100>>2] = saved_threadstorage[0];
|
cmdbuf[0x100>>2] = saved_threadstorage[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user