svn commit: r190522 - head/sys/dev/ofw

Marius Strobl marius at FreeBSD.org
Sun Mar 29 08:10:52 PDT 2009


Author: marius
Date: Sun Mar 29 15:10:49 2009
New Revision: 190522
URL: http://svn.freebsd.org/changeset/base/190522

Log:
  Unbreak OF_interpret() and its standard implementation after r186347.

Modified:
  head/sys/dev/ofw/ofw_standard.c
  head/sys/dev/ofw/openfirm.c

Modified: head/sys/dev/ofw/ofw_standard.c
==============================================================================
--- head/sys/dev/ofw/ofw_standard.c	Sun Mar 29 13:35:20 2009	(r190521)
+++ head/sys/dev/ofw/ofw_standard.c	Sun Mar 29 15:10:49 2009	(r190522)
@@ -204,7 +204,7 @@ ofw_std_interpret(ofw_t ofw, const char 
 	}
 	status = args.slot[i++];
 	while (i < 1 + nreturns)
-		returns[j] = args.slot[i++];
+		returns[j++] = args.slot[i++];
 	return (status);
 }
 

Modified: head/sys/dev/ofw/openfirm.c
==============================================================================
--- head/sys/dev/ofw/openfirm.c	Sun Mar 29 13:35:20 2009	(r190521)
+++ head/sys/dev/ofw/openfirm.c	Sun Mar 29 15:10:49 2009	(r190522)
@@ -164,9 +164,11 @@ OF_interpret(const char *cmd, int nretur
 	int status;
 
 	status = OFW_INTERPRET(ofw_obj, cmd, nreturns, slots);
+	if (status == -1)
+		return (status);
 
 	va_start(ap, nreturns);
-	while (i < 1 + nreturns)
+	while (i < nreturns)
 		*va_arg(ap, cell_t *) = slots[i++];
 	va_end(ap);
 


More information about the svn-src-all mailing list