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

Next file: linux/arch/sparc64/prom/misc.c
Previous file: linux/arch/sparc64/mm/ultra.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.47/linux/arch/sparc64/prom/console.c linux/arch/sparc64/prom/console.c
@@ -1,4 +1,4 @@
-/* $Id: console.c,v 1.6 1997/03/18 17:59:59 jj Exp $
+/* $Id: console.c,v 1.7 1997/07/19 08:28:29 ecd Exp $
  * console.c: Routines that deal with sending and receiving IO
  *            to/from the current console device using the PROM.
  *
@@ -88,6 +88,7 @@
 	if(strncmp(propb, "serial", sizeof("serial")))
 		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])
@@ -116,6 +117,7 @@
 	if(strncmp("serial", propb, sizeof("serial")))
 		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])

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