Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-08-23 06:27:01 +0400
committerChristopher Faylor <me@cgf.cx>2001-08-23 06:27:01 +0400
commitecaff08ccde6c4c4307dd4d6f54da7641221193c (patch)
tree4df556605676c2f5a2bbf04a9f860180558e1c52 /winsup/cygwin/termios.cc
parentcb19ccf4b5f516a404da2f90f5d12721d81c73e1 (diff)
* dtable.cc (dtable::dup2): Allow extension of fd table by dup2.
* syscalls.cc: Minor code cleanup. (fpathconf): Check for bad fd before doing anything else. * termios.cc (tcsetattr): Don't convert to new termios if bad fd. (tcgetattr): Minor debugging tweak.
Diffstat (limited to 'winsup/cygwin/termios.cc')
-rw-r--r--winsup/cygwin/termios.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc
index defea6a53..a2674aae7 100644
--- a/winsup/cygwin/termios.cc
+++ b/winsup/cygwin/termios.cc
@@ -143,13 +143,14 @@ tcsetattr (int fd, int a, const struct termios *t)
{
int res = -1;
- t = __tonew_termios (t);
if (cygheap->fdtab.not_open (fd))
{
set_errno (EBADF);
goto out;
}
+ t = __tonew_termios (t);
+
fhandler_base *fh;
fh = cygheap->fdtab[fd];
@@ -187,7 +188,7 @@ tcgetattr (int fd, struct termios *in_t)
}
if (res)
- termios_printf ("%d = tcgetattr (%d, %x)", res, fd, in_t);
+ termios_printf ("%d = tcgetattr (%d, %p)", res, fd, in_t);
else
termios_printf ("iflag %x, oflag %x, cflag %x, lflag %x, VMIN %d, VTIME %d",
t->c_iflag, t->c_oflag, t->c_cflag, t->c_lflag, t->c_cc[VMIN],