PERFORCE change 30822 for review

Juli Mallett jmallett at FreeBSD.org
Thu May 8 15:24:44 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=30822

Change 30822 by jmallett at 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)
 {


More information about the p4-projects mailing list