Author: arty
Date: Sun Jan 6 18:03:31 2008
New Revision: 31626
URL:
http://svn.reactos.org/svn/reactos?rev=31626&view=rev
Log:
Straggler.
Added:
trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_method.c (with props)
Added: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_method.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_method.c (added)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_method.c Sun Jan 6 18:03:31 2008
@@ -1,0 +1,26 @@
+#include <freeldr.h>
+#include "of.h"
+
+typedef struct _ofw_method_call {
+ const char *call_method;
+ int nargs;
+ int nrets;
+ const char *method_name;
+ int handle;
+ int args_rets[8];
+} ofw_method_call;
+
+extern int (*ofw_call_addr)(void *argstruct);
+
+int ofw_callmethod_ret(const char *method, int handle, int nargs, int *args, int ret)
+{
+ ofw_method_call callframe = { 0 };
+ callframe.call_method = "call-method";
+ callframe.nargs = nargs + 2;
+ callframe.nrets = ret+1;
+ callframe.method_name = method;
+ callframe.handle = handle;
+ memcpy(callframe.args_rets, args, sizeof(int)*nargs);
+ ofw_call_addr(&callframe);
+ return callframe.args_rets[nargs+ret];
+}
Propchange: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_method.c
------------------------------------------------------------------------------
svn:eol-style = native