lxcDriverUnlock(driver);
if (!vm) {
- lxcError(VIR_ERR_NO_DOMAIN, NULL);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching id %d"), id);
goto cleanup;
}
lxcDriverUnlock(driver);
if (!vm) {
- lxcError(VIR_ERR_NO_DOMAIN, NULL);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
vm = virDomainFindByName(&driver->domains, name);
lxcDriverUnlock(driver);
if (!vm) {
- lxcError(VIR_ERR_NO_DOMAIN, NULL);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching name '%s'"), name);
goto cleanup;
}
obj = virDomainFindByUUID(&driver->domains, dom->uuid);
lxcDriverUnlock(driver);
if (!obj) {
- lxcError(VIR_ERR_NO_DOMAIN, NULL);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
ret = virDomainObjIsActive(obj);
obj = virDomainFindByUUID(&driver->domains, dom->uuid);
lxcDriverUnlock(driver);
if (!obj) {
- lxcError(VIR_ERR_NO_DOMAIN, NULL);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
ret = obj->persistent;
lxcDriverLock(driver);
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
if (!vm) {
- lxcError(VIR_ERR_INVALID_DOMAIN,
- "%s", _("No domain with matching uuid"));
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
if (!vm) {
- lxcError(VIR_ERR_INVALID_DOMAIN,
- "%s", _("No domain with matching uuid"));
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
lxcDriverUnlock(driver);
if (!vm) {
- lxcError(VIR_ERR_INVALID_DOMAIN,
- "%s", _("No domain with matching uuid"));
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
lxcDriverUnlock(driver);
if (!vm) {
- lxcError(VIR_ERR_INVALID_DOMAIN,
- "%s", _("No domain with matching uuid"));
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
int ret = -1;
lxcDriverLock(driver);
- vm = virDomainFindByName(&driver->domains, dom->name);
+ vm = virDomainFindByUUID(&driver->domains, dom->uuid);
if (!vm) {
- lxcError(VIR_ERR_INVALID_DOMAIN,
- _("No domain named %s"), dom->name);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
int ret = -1;
lxcDriverLock(driver);
- vm = virDomainFindByID(&driver->domains, dom->id);
+ vm = virDomainFindByUUID(&driver->domains, dom->uuid);
if (!vm) {
- lxcError(VIR_ERR_INVALID_DOMAIN,
- _("No domain with id %d"), dom->id);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
int ret = -1;
lxcDriverLock(driver);
- vm = virDomainFindByID(&driver->domains, dom->id);
+ vm = virDomainFindByUUID(&driver->domains, dom->uuid);
if (!vm) {
- lxcError(VIR_ERR_INVALID_DOMAIN,
- _("No domain with id %d"), dom->id);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(dom->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
vm = virDomainFindByUUID(&driver->domains, domain->uuid);
if (vm == NULL) {
- lxcError(VIR_ERR_INTERNAL_ERROR,
- _("No such domain %s"), domain->uuid);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(domain->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}
vm = virDomainFindByUUID(&driver->domains, domain->uuid);
if (vm == NULL) {
- lxcError(VIR_ERR_INTERNAL_ERROR,
- _("No such domain %s"), domain->uuid);
+ char uuidstr[VIR_UUID_STRING_BUFLEN];
+ virUUIDFormat(domain->uuid, uuidstr);
+ lxcError(VIR_ERR_NO_DOMAIN,
+ _("No domain with matching uuid '%s'"), uuidstr);
goto cleanup;
}