+Thu Dec 8 11:12:36 CET 2005 Daniel Veillard <veillard@redhat.com>
+
+ * src/libvir.c src/xen_internal.c: fixed the new Xen hypervisor call
+
Wed Dec 7 19:09:48 CET 2005 Daniel Veillard <veillard@redhat.com>
* configure.in src/Makefile.am src/libvir.c src/xen_internal.c
dominfo.domain = domain->handle;
ret = xenHypervisorGetDomainInfo(domain->conn->handle, domain->handle,
&dominfo);
- if (ret <= 0)
+ if (ret < 0)
return(-1);
switch (dominfo.flags & 0xFF) {
case DOMFLAGS_DYING:
static int
xenHypervisorDoOp(int handle, dom0_op_t *op) {
int ret;
+ unsigned int cmd;
hypercall_t hc;
op->interface_version = DOM0_INTERFACE_VERSION;
if (mlock(op, sizeof(dom0_op_t)) < 0)
return(-1);
- ret = ioctl(handle, _IOC(_IOC_NONE, 'P', 0, sizeof(hypercall_t)),
- (unsigned long) &hc);
+ cmd = _IOC(_IOC_NONE, 'P', 0, sizeof(hc));
+ ret = ioctl(handle, cmd, (unsigned long) &hc);
if (munlock(op, sizeof(dom0_op_t)) < 0)
ret = -1;
op.u.getdomaininfolist.first_domain = (domid_t) domain;
op.u.getdomaininfolist.max_domains = 1;
op.u.getdomaininfolist.buffer = info;
+ op.u.getdomaininfolist.num_domains = 1;
+ info->domain = domain;
ret = xenHypervisorDoOp(handle, &op);
if (munlock(info, sizeof(dom0_getdomaininfo_t)) < 0)
ret = -1;
- if (ret <= 0)
+ if (ret < 0)
return(-1);
return(0);
}