[XenPPC] [PATCH 4 of 4] [PATCH] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg

2007-01-19 Thread Ryan Harper
1 files changed, 57 insertions(+), 106 deletions(-)
tools/python/xen/lowlevel/xc/xc.c |  163 -


# HG changeset patch
# User Ryan Harper <[EMAIL PROTECTED]>
# Date 1169248739 21600
# Node ID 6e93a244722d7ee5bedbce4d2ee9e3ca46bea7ea
# Parent  8a5446bed383ac438f20137189f627ae9c4e771c
[PATCH] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg

Signed-off-by: Ryan Harper <[EMAIL PROTECTED]>

diff -r 8a5446bed383 -r 6e93a244722d tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Fri Jan 19 17:18:59 2007 -0600
+++ b/tools/python/xen/lowlevel/xc/xc.c Fri Jan 19 17:18:59 2007 -0600
@@ -360,7 +360,6 @@ static PyObject *pyxc_linux_build(XcObje
 unsigned int mem_mb;
 unsigned long store_mfn = 0;
 unsigned long console_mfn = 0;
-int unused;
 
 static char *kwd_list[] = { "domid", "store_evtchn", "memsize",
 "console_evtchn", "image",
@@ -368,12 +367,12 @@ static PyObject *pyxc_linux_build(XcObje
 "ramdisk", "cmdline", "flags",
 "features", NULL };
 
-if ( !PyArg_ParseTupleAndKeywords(args, kwds, "s|ssis#", kwd_list,
+if ( !PyArg_ParseTupleAndKeywords(args, kwds, "s|ssis", kwd_list,
   &dom, &store_evtchn, &mem_mb,
   &console_evtchn, &image,
   /* optional */
   &ramdisk, &cmdline, &flags,
-  &features, &unused) )
+  &features) )
 return NULL;
 
 if ( xc_linux_build(self->xc_handle, dom, mem_mb, image,
@@ -442,6 +441,47 @@ static PyObject *pyxc_hvm_build(XcObject
 return Py_BuildValue("{s:i}", "store_mfn", store_mfn);
 }
 
+#ifdef __powerpc__
+static PyObject *pyxc_prose_build(XcObject *self,
+  PyObject *args,
+  PyObject *kwds)
+{
+uint32_t dom;
+char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
+int flags = 0;
+int store_evtchn, console_evtchn;
+unsigned int mem_mb;
+unsigned long store_mfn = 0;
+unsigned long console_mfn = 0;
+
+static char *kwd_list[] = { "dom", "store_evtchn",
+"console_evtchn", "image", "memsize",
+/* optional */
+"ramdisk", "cmdline", "flags",
+"features", NULL };
+
+if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|ssis", kwd_list,
+  &dom, &store_evtchn,
+  &console_evtchn, &image, &mem_mb,
+  /* optional */
+  &ramdisk, &cmdline, &flags,
+  &features) )
+return NULL;
+
+if ( xc_prose_build(self->xc_handle, dom, mem_mb, image,
+ramdisk, cmdline, features, flags,
+store_evtchn, &store_mfn,
+console_evtchn, &console_mfn) != 0 ) {
+if (!errno)
+ errno = EINVAL;
+return pyxc_error_to_exception();
+}
+return Py_BuildValue("{s:i,s:i}", 
+ "store_mfn", store_mfn,
+ "console_mfn", console_mfn);
+}
+#endif /* powerpc */
+
 static PyObject *pyxc_evtchn_alloc_unbound(XcObject *self,
PyObject *args,
PyObject *kwds)
@@ -915,68 +955,6 @@ static PyObject *dom_op(XcObject *self, 
 Py_INCREF(zero);
 return zero;
 }
-
-#ifdef __powerpc__
-static PyObject *pyxc_alloc_real_mode_area(XcObject *self,
-   PyObject *args,
-   PyObject *kwds)
-{
-uint32_t dom;
-unsigned int log;
-
-static char *kwd_list[] = { "dom", "log", NULL };
-
-if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list, 
-  &dom, &log) )
-return NULL;
-
-if ( xc_alloc_real_mode_area(self->xc_handle, dom, log) )
-return pyxc_error_to_exception();
-
-Py_INCREF(zero);
-return zero;
-}
-
-static PyObject *pyxc_prose_build(XcObject *self,
-  PyObject *args,
-  PyObject *kwds)
-{
-uint32_t dom;
-char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
-int flags = 0;
-int store_evtchn, console_evtchn;
-unsigned int mem_mb;
-unsigned long store_mfn = 0;
-unsigned long console_mfn = 0;
-int unused;
-
-static char *kwd_list[] = { "dom", "store_evtchn",
-"console_evtchn", "image", "memsize",
-/* optional */
-  

[XenPPC] [PATCH 4 of 4] [PATCH] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg

2007-01-19 Thread Ryan Harper
1 files changed, 57 insertions(+), 106 deletions(-)
tools/python/xen/lowlevel/xc/xc.c |  163 -


# HG changeset patch
# User Ryan Harper <[EMAIL PROTECTED]>
# Date 1169241710 21600
# Node ID 2d2cb7d7bd5daa7e4b5ccbc76b2c51163f30f647
# Parent  00c682cf4b4397a4ed25b7b21fefc429f4196d0d
[PATCH] Sync tools/python/xen/lowlevel/xc/xc.c with xen-unstable.hg

Signed-off-by: Ryan Harper <[EMAIL PROTECTED]>

diff -r 00c682cf4b43 -r 2d2cb7d7bd5d tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Fri Jan 19 15:21:50 2007 -0600
+++ b/tools/python/xen/lowlevel/xc/xc.c Fri Jan 19 15:21:50 2007 -0600
@@ -360,7 +360,6 @@ static PyObject *pyxc_linux_build(XcObje
 unsigned int mem_mb;
 unsigned long store_mfn = 0;
 unsigned long console_mfn = 0;
-int unused;
 
 static char *kwd_list[] = { "domid", "store_evtchn", "memsize",
 "console_evtchn", "image",
@@ -368,12 +367,12 @@ static PyObject *pyxc_linux_build(XcObje
 "ramdisk", "cmdline", "flags",
 "features", NULL };
 
-if ( !PyArg_ParseTupleAndKeywords(args, kwds, "s|ssis#", kwd_list,
+if ( !PyArg_ParseTupleAndKeywords(args, kwds, "s|ssis", kwd_list,
   &dom, &store_evtchn, &mem_mb,
   &console_evtchn, &image,
   /* optional */
   &ramdisk, &cmdline, &flags,
-  &features, &unused) )
+  &features) )
 return NULL;
 
 if ( xc_linux_build(self->xc_handle, dom, mem_mb, image,
@@ -442,6 +441,47 @@ static PyObject *pyxc_hvm_build(XcObject
 return Py_BuildValue("{s:i}", "store_mfn", store_mfn);
 }
 
+#ifdef __powerpc__
+static PyObject *pyxc_prose_build(XcObject *self,
+  PyObject *args,
+  PyObject *kwds)
+{
+uint32_t dom;
+char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
+int flags = 0;
+int store_evtchn, console_evtchn;
+unsigned int mem_mb;
+unsigned long store_mfn = 0;
+unsigned long console_mfn = 0;
+
+static char *kwd_list[] = { "dom", "store_evtchn",
+"console_evtchn", "image", "memsize",
+/* optional */
+"ramdisk", "cmdline", "flags",
+"features", NULL };
+
+if ( !PyArg_ParseTupleAndKeywords(args, kwds, "iiis|ssis", kwd_list,
+  &dom, &store_evtchn,
+  &console_evtchn, &image, &mem_mb,
+  /* optional */
+  &ramdisk, &cmdline, &flags,
+  &features) )
+return NULL;
+
+if ( xc_prose_build(self->xc_handle, dom, mem_mb, image,
+ramdisk, cmdline, features, flags,
+store_evtchn, &store_mfn,
+console_evtchn, &console_mfn) != 0 ) {
+if (!errno)
+ errno = EINVAL;
+return pyxc_error_to_exception();
+}
+return Py_BuildValue("{s:i,s:i}", 
+ "store_mfn", store_mfn,
+ "console_mfn", console_mfn);
+}
+#endif /* powerpc */
+
 static PyObject *pyxc_evtchn_alloc_unbound(XcObject *self,
PyObject *args,
PyObject *kwds)
@@ -915,68 +955,6 @@ static PyObject *dom_op(XcObject *self, 
 Py_INCREF(zero);
 return zero;
 }
-
-#ifdef __powerpc__
-static PyObject *pyxc_alloc_real_mode_area(XcObject *self,
-   PyObject *args,
-   PyObject *kwds)
-{
-uint32_t dom;
-unsigned int log;
-
-static char *kwd_list[] = { "dom", "log", NULL };
-
-if ( !PyArg_ParseTupleAndKeywords(args, kwds, "ii", kwd_list, 
-  &dom, &log) )
-return NULL;
-
-if ( xc_alloc_real_mode_area(self->xc_handle, dom, log) )
-return pyxc_error_to_exception();
-
-Py_INCREF(zero);
-return zero;
-}
-
-static PyObject *pyxc_prose_build(XcObject *self,
-  PyObject *args,
-  PyObject *kwds)
-{
-uint32_t dom;
-char *image, *ramdisk = NULL, *cmdline = "", *features = NULL;
-int flags = 0;
-int store_evtchn, console_evtchn;
-unsigned int mem_mb;
-unsigned long store_mfn = 0;
-unsigned long console_mfn = 0;
-int unused;
-
-static char *kwd_list[] = { "dom", "store_evtchn",
-"console_evtchn", "image", "memsize",
-/* optional */
-