Corinna Vinschen <corinna@vinschen.de>
* 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:
@ -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;
|
||||
|
Reference in New Issue
Block a user