Noux: add FIONBIO handling support to libc_noux

This commit is contained in:
Josef Söntgen 2012-08-21 15:10:13 +02:00 committed by Norman Feske
parent 8dfb3d5d81
commit 4aac3933b3
2 changed files with 15 additions and 2 deletions

View File

@ -92,9 +92,10 @@ namespace Noux {
*/
struct Ioctl_in
{
enum Opcode { OP_UNDEFINED, OP_TIOCGWINSZ };
enum Opcode { OP_UNDEFINED, OP_TIOCGWINSZ, OP_FIONBIO };
Opcode request;
int argp;
};
/**

View File

@ -861,9 +861,18 @@ namespace {
break;
case FIONBIO:
{
if (verbose)
PDBG("FIONBIO - *argp=%d", *argp);
sysio()->ioctl_in.request = Noux::Sysio::Ioctl_in::OP_FIONBIO;
sysio()->ioctl_in.argp = argp ? *(int*)argp : 0;
}
default:
PWRN("unsupported ioctl (request=0x%x", request);
PWRN("unsupported ioctl (request=0x%x)", request);
break;
}
@ -892,6 +901,9 @@ namespace {
return 0;
}
case FIONBIO:
return 0;
default:
return -1;
}