* ps.cc (ttynam): Accommodate new console numbering.
(main): Ditto.
This commit is contained in:
parent
6cd2e18523
commit
a4fddeb9f6
@ -1,3 +1,8 @@
|
||||
2011-05-29 Christopher Faylor <me.cygwin2011@cgf.cx>
|
||||
|
||||
* ps.cc (ttynam): Accommodate new console numbering.
|
||||
(main): Ditto.
|
||||
|
||||
2011-05-03 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* locale.cc (print_locale_with_codeset): Align printing of locale names
|
||||
|
@ -198,12 +198,15 @@ to_time_t (FILETIME *ptr)
|
||||
static const char *
|
||||
ttynam (int ntty)
|
||||
{
|
||||
static char buf[5];
|
||||
static char buf[9];
|
||||
char buf0[9];
|
||||
if (ntty < 0)
|
||||
return " ?";
|
||||
if (ntty == TTY_CONSOLE)
|
||||
return " con";
|
||||
sprintf (buf, "%4d", ntty);
|
||||
strcpy (buf0, "?");
|
||||
else if (ntty & 0xffff0000)
|
||||
sprintf (buf0, "cons%d", ntty & 0xff);
|
||||
else
|
||||
sprintf (buf0, "tty%d", ntty);
|
||||
sprintf (buf, " %-7s", buf0);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user