Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/telnetd Handle printing ptyfs pty names



details:   https://anonhg.NetBSD.org/src/rev/2a1aad9c2a57
branches:  trunk
changeset: 579544:2a1aad9c2a57
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 17 01:34:41 2005 +0000

description:
Handle printing ptyfs pty names

diffstat:

 libexec/telnetd/utility.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 8b99dede2d28 -r 2a1aad9c2a57 libexec/telnetd/utility.c
--- a/libexec/telnetd/utility.c Thu Mar 17 01:25:40 2005 +0000
+++ b/libexec/telnetd/utility.c Thu Mar 17 01:34:41 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: utility.c,v 1.27 2005/02/06 17:30:33 agc Exp $ */
+/*     $NetBSD: utility.c,v 1.28 2005/03/17 01:34:41 christos Exp $    */
 
 /*
  * Copyright (c) 1989, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)utility.c  8.4 (Berkeley) 5/30/95";
 #else
-__RCSID("$NetBSD: utility.c,v 1.27 2005/02/06 17:30:33 agc Exp $");
+__RCSID("$NetBSD: utility.c,v 1.28 2005/03/17 01:34:41 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -449,7 +449,8 @@
                switch (*++cp) {
 
                case 't':
-                       slash = strrchr(line, '/');
+                       if ((slash = strstr(line, "/pts/")) == NULL)
+                               slash = strrchr(line, '/');
                        if (slash == (char *) 0)
                                putstr(line);
                        else



Home | Main Index | Thread Index | Old Index