mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 16:26:12 +08:00
* ioctl.cc (ioctl): Always print ioctl results, even when it's a tty.
* winsup.h (low_priority_sleep): Declare.
This commit is contained in:
parent
40e4147f4e
commit
a2dea5c333
@ -1,3 +1,11 @@
|
|||||||
|
2002-11-13 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* ioctl.cc (ioctl): Always print ioctl results, even when it's a tty.
|
||||||
|
|
||||||
|
2002-11-13 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* winsup.h (low_priority_sleep): Declare.
|
||||||
|
|
||||||
2002-11-13 Christopher Faylor <cgf@redhat.com>
|
2002-11-13 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* miscfuncs.cc (low_priority_sleep): New function. Use throughout
|
* miscfuncs.cc (low_priority_sleep): New function. Use throughout
|
||||||
|
@ -39,20 +39,27 @@ ioctl (int fd, int cmd, ...)
|
|||||||
va_end (ap);
|
va_end (ap);
|
||||||
|
|
||||||
debug_printf ("fd %d, cmd %x", fd, cmd);
|
debug_printf ("fd %d, cmd %x", fd, cmd);
|
||||||
|
int res;
|
||||||
if (cfd->is_tty () && cfd->get_device () != FH_PTYM)
|
if (cfd->is_tty () && cfd->get_device () != FH_PTYM)
|
||||||
switch (cmd)
|
switch (cmd)
|
||||||
{
|
{
|
||||||
case TCGETA:
|
case TCGETA:
|
||||||
return tcgetattr (fd, (struct termios *) argp);
|
res = tcgetattr (fd, (struct termios *) argp);
|
||||||
|
goto out;
|
||||||
case TCSETA:
|
case TCSETA:
|
||||||
return tcsetattr (fd, TCSANOW, (struct termios *) argp);
|
res = tcsetattr (fd, TCSANOW, (struct termios *) argp);
|
||||||
|
goto out;
|
||||||
case TCSETAW:
|
case TCSETAW:
|
||||||
return tcsetattr (fd, TCSADRAIN, (struct termios *) argp);
|
res = tcsetattr (fd, TCSADRAIN, (struct termios *) argp);
|
||||||
|
goto out;
|
||||||
case TCSETAF:
|
case TCSETAF:
|
||||||
return tcsetattr (fd, TCSAFLUSH, (struct termios *) argp);
|
res = tcsetattr (fd, TCSAFLUSH, (struct termios *) argp);
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
int res = cfd->ioctl (cmd, argp);
|
res = cfd->ioctl (cmd, argp);
|
||||||
|
|
||||||
|
out:
|
||||||
debug_printf ("returning %d", res);
|
debug_printf ("returning %d", res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user