Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Return directly when pty_alloc_master failes in ptm...



details:   https://anonhg.NetBSD.org/src/rev/1fd7187a2d68
branches:  trunk
changeset: 567214:1fd7187a2d68
user:      lha <lha%NetBSD.org@localhost>
date:      Sat Jun 05 11:23:15 2004 +0000

description:
Return directly when pty_alloc_master failes in ptmioctl,
bug-report on current users from Denis Lagno  dlagno at smtp dot ru.
Make debug message in pty_alloc_master to match the code.

diffstat:

 sys/kern/tty_pty.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ddddb6d168d9 -r 1fd7187a2d68 sys/kern/tty_pty.c
--- a/sys/kern/tty_pty.c        Sat Jun 05 08:41:43 2004 +0000
+++ b/sys/kern/tty_pty.c        Sat Jun 05 11:23:15 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty_pty.c,v 1.78 2004/05/27 03:56:49 christos Exp $    */
+/*     $NetBSD: tty_pty.c,v 1.79 2004/06/05 11:23:15 lha Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.78 2004/05/27 03:56:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty_pty.c,v 1.79 2004/06/05 11:23:15 lha Exp $");
 
 #include "opt_compat_sunos.h"
 #include "pty.h"
@@ -1342,7 +1342,7 @@
                 */
                if (error == EIO && !pty_isfree(md))
                        goto retry;
-               DPRINTF(("check_pty %d\n", error));
+               DPRINTF(("ptm_vn_open %d\n", error));
                goto bad;
        }
        fp->f_flag = FREAD|FWRITE;
@@ -1512,7 +1512,7 @@
        switch (cmd) {
        case TIOCPTMGET:
                if ((error = pty_alloc_master(p, &cfd, &newdev)) != 0)
-                       goto bad;
+                       return error;
 
                if ((error = pty_grant_slave(p, newdev)) != 0)
                        goto bad;



Home | Main Index | Thread Index | Old Index