* fhandler.cc: Add #include for asm/socket.h for dealing with FIONREAD.
(fhandler_base::ioctl): Special-case errno for FIONREAD.
* fhandler_dsp.cc (fhandler_dev_dsp::ioctl): Rename parameter for consistency.
Call fhandler_base::ioctl to decode default condition.
* fhandler_serial.cc (fhandler_serial::ioctl): Ditto.
* fhandler_tty.cc (fhandler_pty_slave::ioctl): Call fhandler_base::ioctl to
decode default condition.
* fhandler_windows.cc (fhandler_windows::ioctl): Ditto.
This commit is contained in:
Christopher Faylor
2011-07-21 20:21:46 +00:00
parent 37aeec7f72
commit e9b5cc32f7
6 changed files with 77 additions and 60 deletions

View File

@ -28,6 +28,7 @@ details. */
#include "ntdll.h"
#include "cygtls.h"
#include "sigproc.h"
#include <asm/socket.h>
#define MAX_OVERLAPPED_WRITE_LEN (64 * 1024 * 1024)
#define MIN_OVERLAPPED_WRITE_LEN (1 * 1024 * 1024)
@ -1151,6 +1152,10 @@ fhandler_base::ioctl (unsigned int cmd, void *buf)
set_nonblocking (*(int *) buf);
res = 0;
break;
case FIONREAD:
set_errno (ENOTTY);
res = -1;
break;
default:
set_errno (EINVAL);
res = -1;