From owner-p4-projects@FreeBSD.ORG Thu May 8 15:24:44 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5D6BB37B407; Thu, 8 May 2003 15:24:43 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D56837B405 for ; Thu, 8 May 2003 15:24:43 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAD0443FA3 for ; Thu, 8 May 2003 15:24:42 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h48MOg0U086709 for ; Thu, 8 May 2003 15:24:42 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h48MOgnt086706 for perforce@freebsd.org; Thu, 8 May 2003 15:24:42 -0700 (PDT) Date: Thu, 8 May 2003 15:24:42 -0700 (PDT) Message-Id: <200305082224.h48MOgnt086706@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 30822 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2003 22:24:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=30822 Change 30822 by jmallett@jmallett_dalek on 2003/05/08 15:23:49 Add a cncheckc. Affected files ... .. //depot/projects/mips/sys/dev/arcbios/arcbios.c#8 edit Differences ... ==== //depot/projects/mips/sys/dev/arcbios/arcbios.c#8 (text+ko) ==== @@ -58,6 +58,7 @@ char arcbios_system_identifier[64 + 1]; static cn_getc_t arcbios_cngetc; +static cn_checkc_t arcbios_cncheckc; static cn_putc_t arcbios_cnputc; static void arcbios_fill_vector(struct arcbios *, const struct arcbios_fv *); @@ -65,7 +66,7 @@ struct arcbios_treewalk_context *); extern struct cdevsw arcbios_cdevsw; -CONS_DRIVER(arcbios, NULL, NULL, NULL, arcbios_cngetc, NULL, arcbios_cnputc, NULL); +CONS_DRIVER(arcbios, NULL, NULL, NULL, arcbios_cngetc, arcbios_cncheckc, arcbios_cnputc, NULL); /* * arcbios_init: @@ -257,6 +258,19 @@ return (c); } +int +arcbios_cncheckc(struct consdev *cdev) +{ + int q; + + q = (*ARCBIOS->GetReadStatus)(ARCBIOS_STDIN); + if (q == 0) { + return (arcbios_cngetc(cdev)); + } + + return (-1); +} + void arcbios_cnputc(struct consdev *cdev, int c) {