From owner-svn-src-all@FreeBSD.ORG Thu Mar 29 15:47:30 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE8E6106564A; Thu, 29 Mar 2012 15:47:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA2418FC1A; Thu, 29 Mar 2012 15:47:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2TFlUnJ099652; Thu, 29 Mar 2012 15:47:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2TFlUab099649; Thu, 29 Mar 2012 15:47:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201203291547.q2TFlUab099649@svn.freebsd.org> From: Hans Petter Selasky Date: Thu, 29 Mar 2012 15:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233664 - in head/sys: dev/syscons sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2012 15:47:30 -0000 Author: hselasky Date: Thu Mar 29 15:47:29 2012 New Revision: 233664 URL: http://svn.freebsd.org/changeset/base/233664 Log: Move tty_opened_ns() into syscons.c which is currently the only client of this macro. Suggested by: ed @ MFC after: 1 week Modified: head/sys/dev/syscons/syscons.c head/sys/sys/tty.h Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Thu Mar 29 15:43:07 2012 (r233663) +++ head/sys/dev/syscons/syscons.c Thu Mar 29 15:47:29 2012 (r233664) @@ -86,6 +86,9 @@ __FBSDID("$FreeBSD$"); #define KEYCODE_BS 0x0e /* "<-- Backspace" key, XXX */ +/* NULL-safe version of "tty_opened()" */ +#define tty_opened_ns(tp) ((tp) != NULL && tty_opened(tp)) + typedef struct default_attr { int std_color; /* normal hardware color */ int rev_color; /* reverse hardware color */ Modified: head/sys/sys/tty.h ============================================================================== --- head/sys/sys/tty.h Thu Mar 29 15:43:07 2012 (r233663) +++ head/sys/sys/tty.h Thu Mar 29 15:47:29 2012 (r233664) @@ -197,8 +197,6 @@ void tty_hiwat_in_block(struct tty *tp); void tty_hiwat_in_unblock(struct tty *tp); dev_t tty_udev(struct tty *tp); #define tty_opened(tp) ((tp)->t_flags & TF_OPENED) -/* NULL-safe version of "tty_opened()" */ -#define tty_opened_ns(tp) ((tp) != NULL && tty_opened(tp)) #define tty_gone(tp) ((tp)->t_flags & TF_GONE) #define tty_softc(tp) ((tp)->t_devswsoftc) #define tty_devname(tp) devtoname((tp)->t_dev)