patch-2.1.53 linux/arch/sparc64/prom/console.c

Next file: linux/arch/sparc64/prom/ranges.c
Previous file: linux/arch/sparc64/mm/init.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.52/linux/arch/sparc64/prom/console.c linux/arch/sparc64/prom/console.c
@@ -1,4 +1,4 @@
-/* $Id: console.c,v 1.7 1997/07/19 08:28:29 ecd Exp $
+/* $Id: console.c,v 1.8 1997/08/16 08:00:16 davem Exp $
  * console.c: Routines that deal with sending and receiving IO
  *            to/from the current console device using the PROM.
  *
@@ -85,13 +85,13 @@
 	if(prom_node_has_property(st_p, "keyboard"))
 		return PROMDEV_IKBD;
 	prom_getproperty(st_p, "device_type", propb, sizeof(propb));
-	if(strncmp(propb, "serial", sizeof("serial")))
+	if(strncmp(propb, "serial", 6))
 		return PROMDEV_I_UNK;
 	/* FIXME: Is there any better way how to find out? */	
 	memset(propb, 0, sizeof(propb));
 	st_p = prom_finddevice ("/options");
 	prom_getproperty(st_p, "input-device", propb, sizeof(propb));
-	if (strncmp (propb, "tty", 3) || !propb[3] || propb[4])
+	if (strncmp (propb, "tty", 3) || !propb[3])
 		return PROMDEV_I_UNK;
 	switch (propb[3]) {
 		case 'a': return PROMDEV_ITTYA;
@@ -114,13 +114,13 @@
 	if (propl >= 0 && propl == sizeof("display") &&
 	    strncmp("display", propb, sizeof("display")) == 0)
 		return PROMDEV_OSCREEN;
-	if(strncmp("serial", propb, sizeof("serial")))
+	if(strncmp("serial", propb, 6))
 		return PROMDEV_O_UNK;
 	/* FIXME: Is there any better way how to find out? */	
 	memset(propb, 0, sizeof(propb));
 	st_p = prom_finddevice ("/options");
 	prom_getproperty(st_p, "output-device", propb, sizeof(propb));
-	if (strncmp (propb, "tty", 3) || !propb[3] || propb[4])
+	if (strncmp (propb, "tty", 3) || !propb[3])
 		return PROMDEV_O_UNK;
 	switch (propb[3]) {
 		case 'a': return PROMDEV_OTTYA;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov