Subject: Re: Javastation (Krups) boot problems
To: Nate <sma11k3ys@yahoo.com>
From: Martin Husemann <martin@duskware.de>
List: port-sparc
Date: 04/18/2005 08:08:11
--k1lZvvs/B4yU6o8G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Apr 18, 2005 at 12:02:26AM +0200, Martin Husemann wrote:
> The attached patch fixes it for me - anyone care to comment?

Ok, ok, no comments on my age, please. Here is the patch.

Martin

--k1lZvvs/B4yU6o8G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="promlib.c.patch"

Index: promlib.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/sparc/promlib.c,v
retrieving revision 1.34
diff -c -u -r1.34 promlib.c
--- promlib.c	23 Mar 2004 15:29:56 -0000	1.34
+++ promlib.c	17 Apr 2005 21:58:13 -0000
@@ -708,18 +708,12 @@
 	return (parse_bootargs(*ba->v2_bootargs));
 }
 
-/*
- * Static storage shared by prom_getbootfile(), prom_getbootargs() and
- * prom_getbootpath().
- * Overwritten on each call!
- */
-static	char storage[128];
-
 char *
 parse_bootfile(args)
 	char *args;
 {
 	char *cp, *dp;
+	static char storage[128];
 
 	cp = args;
 	dp = storage;
@@ -751,6 +745,7 @@
 	struct v2bootargs *ba = promops.po_bootcookie;
 	char *kernel = parse_bootfile(*ba->v2_bootargs);
 	char buf[4+1], *prop;
+	static char storage[128];
 
 	if (kernel[0] != '\0')
 		return kernel;
@@ -836,6 +831,7 @@
 opf_getbootpath()
 {
 	int node = findchosen();
+	static char storage[128];
 	char *buf = storage;
 	int blen = sizeof storage;
 
@@ -849,6 +845,7 @@
 opf_getbootargs()
 {
 	int node = findchosen();
+	static char storage[128];
 	char *buf = storage;
 	int blen = sizeof storage;
 
@@ -862,6 +859,7 @@
 opf_getbootfile()
 {
 	int node = findchosen();
+	static char storage[128];
 	char *buf = storage;
 	int blen = sizeof storage;
 

--k1lZvvs/B4yU6o8G--