diff options
author | Christopher Faylor <me@cgf.cx> | 2001-08-23 02:27:01 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-08-23 02:27:01 +0000 |
commit | ecaff08ccde6c4c4307dd4d6f54da7641221193c (patch) | |
tree | 4df556605676c2f5a2bbf04a9f860180558e1c52 /winsup/cygwin/termios.cc | |
parent | cb19ccf4b5f516a404da2f90f5d12721d81c73e1 (diff) | |
download | newlib-ecaff08ccde6c4c4307dd4d6f54da7641221193c.zip newlib-ecaff08ccde6c4c4307dd4d6f54da7641221193c.tar.gz newlib-ecaff08ccde6c4c4307dd4d6f54da7641221193c.tar.bz2 |
* 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.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/termios.cc b/winsup/cygwin/termios.cc index defea6a..a2674aa 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], |