* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.

This commit is contained in:
Corinna Vinschen 2003-10-25 12:32:56 +00:00
parent 28194e813e
commit 89256ff149
2 changed files with 19 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2003-10-25 Brian Ford <ford@vss.fsi.com>
* fhandler.cc (fhandler_base::ioctl): Handle FIONBIO.
2003-10-24 Thomas Pfaff <tpfaff@gmx.net>
Rename native_mutex to fast_mutex throughout.

View File

@ -909,13 +909,22 @@ fhandler_base::close ()
int
fhandler_base::ioctl (unsigned int cmd, void *buf)
{
if (cmd == FIONBIO)
syscall_printf ("ioctl (FIONBIO, %p)", buf);
else
syscall_printf ("ioctl (%x, %p)", cmd, buf);
int res;
set_errno (EINVAL);
return -1;
switch (cmd)
{
case FIONBIO:
set_nonblocking (*(int *) buf);
res = 0;
break;
default:
set_errno (EINVAL);
res = -1;
break;
}
syscall_printf ("%d = ioctl (%x, %p)", res, cmd, buf);
return res;
}
int