Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/compat/common/tty_43.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/compat/common/tty_43.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.24.12.2 retrieving revision 1.25 diff -u -p -r1.24.12.2 -r1.25 --- src/sys/compat/common/tty_43.c 2009/01/17 13:28:41 1.24.12.2 +++ src/sys/compat/common/tty_43.c 2008/04/23 13:44:46 1.25 @@ -1,4 +1,4 @@ -/* $NetBSD: tty_43.c,v 1.24.12.2 2009/01/17 13:28:41 mjf Exp $ */ +/* $NetBSD: tty_43.c,v 1.25 2008/04/23 13:44:46 ad Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -12,6 +12,13 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the NetBSD + * Foundation, Inc. and its contributors. + * 4. Neither the name of The NetBSD Foundation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -62,7 +69,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tty_43.c,v 1.24.12.2 2009/01/17 13:28:41 mjf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tty_43.c,v 1.25 2008/04/23 13:44:46 ad Exp $"); #include #include @@ -76,6 +83,11 @@ __KERNEL_RCSID(0, "$NetBSD: tty_43.c,v 1 #include #include +/* + * XXX libcompat files should be included with config attributes + */ +#ifdef COMPAT_OLDTTY + int ttydebug = 0; static const struct speedtab compatspeeds[] = { @@ -108,7 +120,6 @@ static const int compatspcodes[] = { static int ttcompatgetflags(struct tty *); static void ttcompatsetflags(struct tty *, struct termios *); static void ttcompatsetlflags(struct tty *, struct termios *); -int ttcompat(struct tty *, u_long, void *, int, struct lwp *); /*ARGSUSED*/ int @@ -271,17 +282,17 @@ ttcompat(struct tty *tp, u_long com, voi break; case TIOCGSID: - mutex_enter(proc_lock); + mutex_enter(&proclist_lock); if (tp->t_session == NULL) { - mutex_exit(proc_lock); + mutex_exit(&proclist_lock); return ENOTTY; } if (tp->t_session->s_leader == NULL) { - mutex_exit(proc_lock); + mutex_exit(&proclist_lock); return ENOTTY; } *(int *) data = tp->t_session->s_leader->p_pid; - mutex_exit(proc_lock); + mutex_exit(&proclist_lock); break; default: @@ -511,3 +522,5 @@ ttcompatsetlflags(struct tty *tp, struct t->c_lflag = lflag; t->c_cflag = cflag; } + +#endif /* COMPAT_OLDTTY */