diff options
Diffstat (limited to 'winsup/cygwin/tty.cc')
-rw-r--r-- | winsup/cygwin/tty.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/winsup/cygwin/tty.cc b/winsup/cygwin/tty.cc index 515e706a0..7388ac1a3 100644 --- a/winsup/cygwin/tty.cc +++ b/winsup/cygwin/tty.cc @@ -1,7 +1,7 @@ /* tty.cc Copyright 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, - 2010, 2011 Red Hat, Inc. + 2010, 2011, 2012 Red Hat, Inc. This file is part of Cygwin. @@ -85,7 +85,7 @@ tty::init_session () cygheap->fdtab.get_debugger_info (); } -int __stdcall +int __reg2 tty_list::attach (int n) { int res; @@ -163,7 +163,7 @@ tty::not_allocated (HANDLE& r, HANDLE& w) /* Attempt to open the from-master side of the tty. If it is accessible then it exists although we may not have privileges to actually use it. */ char pipename[sizeof("ptyNNNN-from-master")]; - __small_sprintf (pipename, "pty%d-from-master", get_unit ()); + __small_sprintf (pipename, "pty%d-from-master", get_minor ()); /* fhandler_pipe::create returns 0 when creation succeeds */ return fhandler_pipe::create (&sec_none, &r, &w, fhandler_pty_common::pipesize, pipename, @@ -202,7 +202,7 @@ HANDLE tty::open_mutex (const char *mutex, ACCESS_MASK access) { char buf[MAX_PATH]; - shared_name (buf, mutex, get_unit ()); + shared_name (buf, mutex, get_minor ()); return OpenMutex (access, TRUE, buf); } @@ -210,7 +210,7 @@ HANDLE tty::open_inuse (ACCESS_MASK access) { char buf[MAX_PATH]; - shared_name (buf, TTY_SLAVE_ALIVE, get_unit ()); + shared_name (buf, TTY_SLAVE_ALIVE, get_minor ()); return OpenEvent (access, FALSE, buf); } @@ -220,11 +220,11 @@ tty::create_inuse (PSECURITY_ATTRIBUTES sa) HANDLE h; char buf[MAX_PATH]; - shared_name (buf, TTY_SLAVE_ALIVE, get_unit ()); + shared_name (buf, TTY_SLAVE_ALIVE, get_minor ()); h = CreateEvent (sa, TRUE, FALSE, buf); termios_printf ("%s %p", buf, h); if (!h) - termios_printf ("couldn't open inuse event, %E", buf); + termios_printf ("couldn't open inuse event %s, %E", buf); return h; } @@ -245,7 +245,7 @@ tty::get_event (const char *fmt, PSECURITY_ATTRIBUTES sa, BOOL manual_reset) HANDLE hev; char buf[MAX_PATH]; - shared_name (buf, fmt, get_unit ()); + shared_name (buf, fmt, get_minor ()); if (!sa) sa = &sec_all; if (!(hev = CreateEvent (sa, manual_reset, FALSE, buf))) |