Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2003 15:24:42 -0700 (PDT)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30822 for review
Message-ID:  <200305082224.h48MOgnt086706@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305082224.h48MOgnt086706>