From: Ian Campbell Subject: Re: [PATCH v2 3/5] libxl: call hotplug scripts from libxl for vbd Date: Wed, 18 Apr 2012 10:25:23 +0100 Message-ID: <1334741123.23948.159.camel@zakaz.uk.xensource.com> References: <1334677876-17704-1-git-send-email-roger.pau@citrix.com> <1334677876-17704-4-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1334677876-17704-4-git-send-email-roger.pau@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, 2012-04-17 at 16:51 +0100, Roger Pau Monne wrote: > diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c > index bbbf2a9..a41a720 100644 > --- a/tools/python/xen/lowlevel/xl/xl.c > +++ b/tools/python/xen/lowlevel/xl/xl.c > @@ -444,9 +444,10 @@ static PyObject *pyxl_domain_reboot(XlObject *self, PyObject *args) > static PyObject *pyxl_domain_destroy(XlObject *self, PyObject *args) > { > int domid; > - if ( !PyArg_ParseTuple(args, "i", &domid) ) > + const libxl_asyncop_how *ao_how; > + if ( !PyArg_ParseTuple(args, "ii", &domid, &ao_how) ) > return NULL; > - if ( libxl_domain_destroy(self->ctx, domid) ) { > + if ( libxl_domain_destroy(self->ctx, domid, ao_how) ) { Without a bunch more infrastructure to allow python to create and managed ao_how and callbacks etc there's not really much point in this and you might as well just declare that the python bindings as synchronous (i.e. pass NULL here). Otherwise the poatch looks good: Acked-by: Ian Campbell > PyErr_SetString(xl_error_obj, "cannot destroy domain"); > return NULL; > } > -- > 1.7.7.5 (Apple Git-26) > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel