Source-Changes-HG archive

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

[src/trunk]: src/libexec/getty print ptyfs ptys properly.



details:   https://anonhg.NetBSD.org/src/rev/8b99dede2d28
branches:  trunk
changeset: 579543:8b99dede2d28
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 17 01:25:40 2005 +0000

description:
print ptyfs ptys properly.

diffstat:

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

diffs (28 lines):

diff -r 77b4c15d0eb9 -r 8b99dede2d28 libexec/getty/main.c
--- a/libexec/getty/main.c      Thu Mar 17 01:14:40 2005 +0000
+++ b/libexec/getty/main.c      Thu Mar 17 01:25:40 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.46 2004/11/05 21:52:07 dsl Exp $    */
+/*     $NetBSD: main.c,v 1.47 2005/03/17 01:25:40 christos Exp $       */
 
 /*-
  * Copyright (c) 1980, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = "from: @(#)main.c       8.1 (Berkeley) 6/20/93";
 #else
-__RCSID("$NetBSD: main.c,v 1.46 2004/11/05 21:52:07 dsl Exp $");
+__RCSID("$NetBSD: main.c,v 1.47 2005/03/17 01:25:40 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -658,7 +658,8 @@
                switch (*++cp) {
 
                case 't':
-                       slash = strrchr(ttyn, '/');
+                       if ((slash = strstr(ttyn, "/pts/")) == NULL)
+                               slash = strrchr(ttyn, '/');
                        if (slash == NULL)
                                xputs(ttyn);
                        else



Home | Main Index | Thread Index | Old Index