diff --git a/ChangeLog b/ChangeLog index e35a1ad002..734a721cf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jul 16 22:36:43 CEST 2008 Daniel Veillard + + * src/libvirt.c src/openvz_driver.c: fix the description of the ID + domain lookup and fix the OpenVZ routine + Wed Jul 16 17:25:02 CEST 2008 Daniel Veillard * src/openvz_driver.c: fix the lookup by ID function and error diff --git a/src/libvirt.c b/src/libvirt.c index 0ce90cf633..434ab69a05 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -1253,6 +1253,8 @@ virDomainCreateLinux(virConnectPtr conn, const char *xmlDesc, * @id: the domain ID number * * Try to find a domain based on the hypervisor ID number + * Note that this won't work for inactive domains which have an ID of -1, + * in that case a lookup based on the Name or UUId need to be done instead. * * Returns a new domain object or NULL in case of failure. If the * domain cannot be found, then VIR_ERR_NO_DOMAIN error is raised. diff --git a/src/openvz_driver.c b/src/openvz_driver.c index d1aa87b8ea..61ba6ff41c 100644 --- a/src/openvz_driver.c +++ b/src/openvz_driver.c @@ -202,15 +202,6 @@ static virDomainPtr openvzDomainLookupByID(virConnectPtr conn, vm = openvzFindVMByID(driver, id); - if (!vm) { /*try to find by name*/ - char name[OPENVZ_NAME_MAX]; - if (snprintf(name, OPENVZ_NAME_MAX, "%d",id) >= OPENVZ_NAME_MAX) { - openvzError(conn, VIR_ERR_INTERNAL_ERROR, _("Too long domain name")); - return NULL; - } - vm = openvzFindVMByName(driver, name); - } - if (!vm) { openvzError(conn, VIR_ERR_NO_DOMAIN, NULL); return NULL;