mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Replace use of vmwareError with virReportError
Update the VMWare driver to use virReportError instead of the vmwareError custom macro Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
1
cfg.mk
1
cfg.mk
@@ -543,7 +543,6 @@ msg_gen_function += virSecurityReportError
|
|||||||
msg_gen_function += virXenInotifyError
|
msg_gen_function += virXenInotifyError
|
||||||
msg_gen_function += virXenStoreError
|
msg_gen_function += virXenStoreError
|
||||||
msg_gen_function += virXendError
|
msg_gen_function += virXendError
|
||||||
msg_gen_function += vmwareError
|
|
||||||
msg_gen_function += xenapiSessionErrorHandler
|
msg_gen_function += xenapiSessionErrorHandler
|
||||||
msg_gen_function += xenUnifiedError
|
msg_gen_function += xenUnifiedError
|
||||||
msg_gen_function += xenXMError
|
msg_gen_function += xenXMError
|
||||||
|
|||||||
@@ -252,13 +252,13 @@ vmwareExtractVersion(struct vmware_driver *driver)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if ((tmp = STRSKIP(outbuf, pattern)) == NULL) {
|
if ((tmp = STRSKIP(outbuf, pattern)) == NULL) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("failed to parse %s version"), bin);
|
_("failed to parse %s version"), bin);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virParseVersionString(tmp, &version, false) < 0) {
|
if (virParseVersionString(tmp, &version, false) < 0) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("version parsing error"));
|
_("version parsing error"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -303,7 +303,7 @@ vmwareParsePath(char *path, char **directory, char **filename)
|
|||||||
*separator++ = '\0';
|
*separator++ = '\0';
|
||||||
|
|
||||||
if (*separator == '\0') {
|
if (*separator == '\0') {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("path '%s' doesn't reference a file"), path);
|
_("path '%s' doesn't reference a file"), path);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -361,7 +361,7 @@ vmwareVmxPath(virDomainDefPtr vmdef, char **vmxPath)
|
|||||||
* isn't perfect but should work in the majority of cases.
|
* isn't perfect but should work in the majority of cases.
|
||||||
*/
|
*/
|
||||||
if (vmdef->ndisks < 1) {
|
if (vmdef->ndisks < 1) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("Domain XML doesn't contain any disks, "
|
_("Domain XML doesn't contain any disks, "
|
||||||
"cannot deduce datastore and path for VMX file"));
|
"cannot deduce datastore and path for VMX file"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -376,14 +376,14 @@ vmwareVmxPath(virDomainDefPtr vmdef, char **vmxPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (disk == NULL) {
|
if (disk == NULL) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("Domain XML doesn't contain any file-based harddisks, "
|
_("Domain XML doesn't contain any file-based harddisks, "
|
||||||
"cannot deduce datastore and path for VMX file"));
|
"cannot deduce datastore and path for VMX file"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disk->src == NULL) {
|
if (disk->src == NULL) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("First file-based harddisk has no source, cannot "
|
_("First file-based harddisk has no source, cannot "
|
||||||
"deduce datastore and path for VMX file"));
|
"deduce datastore and path for VMX file"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -394,7 +394,7 @@ vmwareVmxPath(virDomainDefPtr vmdef, char **vmxPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!virFileHasSuffix(fileName, ".vmdk")) {
|
if (!virFileHasSuffix(fileName, ".vmdk")) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Expecting source '%s' of first file-based harddisk "
|
_("Expecting source '%s' of first file-based harddisk "
|
||||||
"to be a VMDK image"), disk->src);
|
"to be a VMDK image"), disk->src);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
@@ -420,7 +420,7 @@ vmwareMoveFile(char *srcFile, char *dstFile)
|
|||||||
{ "mv", PROGRAM_SENTINAL, PROGRAM_SENTINAL, NULL };
|
{ "mv", PROGRAM_SENTINAL, PROGRAM_SENTINAL, NULL };
|
||||||
|
|
||||||
if (!virFileExists(srcFile)) {
|
if (!virFileExists(srcFile)) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, _("file %s does not exist"),
|
virReportError(VIR_ERR_INTERNAL_ERROR, _("file %s does not exist"),
|
||||||
srcFile);
|
srcFile);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -431,7 +431,7 @@ vmwareMoveFile(char *srcFile, char *dstFile)
|
|||||||
vmwareSetSentinal(cmdmv, srcFile);
|
vmwareSetSentinal(cmdmv, srcFile);
|
||||||
vmwareSetSentinal(cmdmv, dstFile);
|
vmwareSetSentinal(cmdmv, dstFile);
|
||||||
if (virRun(cmdmv, NULL) < 0) {
|
if (virRun(cmdmv, NULL) < 0) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("failed to move file to %s "), dstFile);
|
_("failed to move file to %s "), dstFile);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -472,13 +472,13 @@ vmwareExtractPid(const char * vmxPath)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!fgets(line, sizeof(line), logFile)) {
|
if (!fgets(line, sizeof(line), logFile)) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("unable to read vmware log file"));
|
_("unable to read vmware log file"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((tmp = strstr(line, " pid=")) == NULL) {
|
if ((tmp = strstr(line, " pid=")) == NULL) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("cannot find pid in vmware log file"));
|
_("cannot find pid in vmware log file"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -488,7 +488,7 @@ vmwareExtractPid(const char * vmxPath)
|
|||||||
/* Although 64-bit windows allows 64-bit pid_t, a domain id has to be
|
/* Although 64-bit windows allows 64-bit pid_t, a domain id has to be
|
||||||
* 32 bits. For now, we just reject pid values that overflow int. */
|
* 32 bits. For now, we just reject pid values that overflow int. */
|
||||||
if (virStrToLong_i(tmp, &tmp, 10, &pid_value) < 0 || *tmp != ' ') {
|
if (virStrToLong_i(tmp, &tmp, 10, &pid_value) < 0 || *tmp != ' ') {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("cannot parse pid in vmware log file"));
|
_("cannot parse pid in vmware log file"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,6 @@
|
|||||||
# define VIR_FROM_THIS VIR_FROM_VMWARE
|
# define VIR_FROM_THIS VIR_FROM_VMWARE
|
||||||
# define PROGRAM_SENTINAL ((char *)0x1)
|
# define PROGRAM_SENTINAL ((char *)0x1)
|
||||||
|
|
||||||
# define vmwareError(code, ...) \
|
|
||||||
virReportErrorHelper(VIR_FROM_VMWARE, code, __FILE__, \
|
|
||||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
|
||||||
|
|
||||||
# define TYPE_PLAYER 0
|
# define TYPE_PLAYER 0
|
||||||
# define TYPE_WORKSTATION 1
|
# define TYPE_WORKSTATION 1
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ vmwareOpen(virConnectPtr conn,
|
|||||||
|
|
||||||
/* If path isn't /session, then they typoed, so tell them correct path */
|
/* If path isn't /session, then they typoed, so tell them correct path */
|
||||||
if (conn->uri->path == NULL || STRNEQ(conn->uri->path, "/session")) {
|
if (conn->uri->path == NULL || STRNEQ(conn->uri->path, "/session")) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("unexpected VMware URI path '%s', try vmwareplayer:///session or vmwarews:///session"),
|
_("unexpected VMware URI path '%s', try vmwareplayer:///session or vmwarews:///session"),
|
||||||
NULLSTR(conn->uri->path));
|
NULLSTR(conn->uri->path));
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
@@ -111,7 +111,7 @@ vmwareOpen(virConnectPtr conn,
|
|||||||
vmrun = virFindFileInPath(VMRUN);
|
vmrun = virFindFileInPath(VMRUN);
|
||||||
|
|
||||||
if (vmrun == NULL) {
|
if (vmrun == NULL) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("%s utility is missing"), VMRUN);
|
_("%s utility is missing"), VMRUN);
|
||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
} else {
|
} else {
|
||||||
@@ -273,7 +273,7 @@ vmwareStartVM(struct vmware_driver *driver, virDomainObjPtr vm)
|
|||||||
const char *vmxPath = ((vmwareDomainPtr) vm->privateData)->vmxPath;
|
const char *vmxPath = ((vmwareDomainPtr) vm->privateData)->vmxPath;
|
||||||
|
|
||||||
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_SHUTOFF) {
|
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_SHUTOFF) {
|
||||||
vmwareError(VIR_ERR_OPERATION_INVALID, "%s",
|
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
|
||||||
_("domain is not in shutoff state"));
|
_("domain is not in shutoff state"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -334,7 +334,7 @@ vmwareDomainDefineXML(virConnectPtr conn, const char *xml)
|
|||||||
|
|
||||||
/* create vmx file */
|
/* create vmx file */
|
||||||
if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) {
|
if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Failed to write vmx file '%s'"), vmxPath);
|
_("Failed to write vmx file '%s'"), vmxPath);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ vmwareDomainShutdownFlags(virDomainPtr dom,
|
|||||||
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, "%s",
|
virReportError(VIR_ERR_NO_DOMAIN, "%s",
|
||||||
_("no domain with matching uuid"));
|
_("no domain with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -395,7 +395,7 @@ vmwareDomainShutdownFlags(virDomainPtr dom,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
|
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("domain is not in running state"));
|
_("domain is not in running state"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -435,7 +435,7 @@ vmwareDomainSuspend(virDomainPtr dom)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (driver->type == TYPE_PLAYER) {
|
if (driver->type == TYPE_PLAYER) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("vmplayer does not support libvirt suspend/resume"
|
_("vmplayer does not support libvirt suspend/resume"
|
||||||
" (vmware pause/unpause) operation "));
|
" (vmware pause/unpause) operation "));
|
||||||
return ret;
|
return ret;
|
||||||
@@ -446,7 +446,7 @@ vmwareDomainSuspend(virDomainPtr dom)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, "%s",
|
virReportError(VIR_ERR_NO_DOMAIN, "%s",
|
||||||
_("no domain with matching uuid"));
|
_("no domain with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -454,7 +454,7 @@ vmwareDomainSuspend(virDomainPtr dom)
|
|||||||
vmwareSetSentinal(cmd, vmw_types[driver->type]);
|
vmwareSetSentinal(cmd, vmw_types[driver->type]);
|
||||||
vmwareSetSentinal(cmd, ((vmwareDomainPtr) vm->privateData)->vmxPath);
|
vmwareSetSentinal(cmd, ((vmwareDomainPtr) vm->privateData)->vmxPath);
|
||||||
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
|
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("domain is not in running state"));
|
_("domain is not in running state"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -484,7 +484,7 @@ vmwareDomainResume(virDomainPtr dom)
|
|||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
if (driver->type == TYPE_PLAYER) {
|
if (driver->type == TYPE_PLAYER) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("vmplayer does not support libvirt suspend/resume"
|
_("vmplayer does not support libvirt suspend/resume"
|
||||||
"(vmware pause/unpause) operation "));
|
"(vmware pause/unpause) operation "));
|
||||||
return ret;
|
return ret;
|
||||||
@@ -495,7 +495,7 @@ vmwareDomainResume(virDomainPtr dom)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, "%s",
|
virReportError(VIR_ERR_NO_DOMAIN, "%s",
|
||||||
_("no domain with matching uuid"));
|
_("no domain with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -503,7 +503,7 @@ vmwareDomainResume(virDomainPtr dom)
|
|||||||
vmwareSetSentinal(cmd, vmw_types[driver->type]);
|
vmwareSetSentinal(cmd, vmw_types[driver->type]);
|
||||||
vmwareSetSentinal(cmd, ((vmwareDomainPtr) vm->privateData)->vmxPath);
|
vmwareSetSentinal(cmd, ((vmwareDomainPtr) vm->privateData)->vmxPath);
|
||||||
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PAUSED) {
|
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_PAUSED) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("domain is not in suspend state"));
|
_("domain is not in suspend state"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -539,7 +539,7 @@ vmwareDomainReboot(virDomainPtr dom, unsigned int flags)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, "%s",
|
virReportError(VIR_ERR_NO_DOMAIN, "%s",
|
||||||
_("no domain with matching uuid"));
|
_("no domain with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -552,7 +552,7 @@ vmwareDomainReboot(virDomainPtr dom, unsigned int flags)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
|
if (virDomainObjGetState(vm, NULL) != VIR_DOMAIN_RUNNING) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR, "%s",
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
_("domain is not in running state"));
|
_("domain is not in running state"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -605,7 +605,7 @@ vmwareDomainCreateXML(virConnectPtr conn, const char *xml,
|
|||||||
|
|
||||||
/* create vmx file */
|
/* create vmx file */
|
||||||
if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) {
|
if (virFileWriteStr(vmxPath, vmx, S_IRUSR|S_IWUSR) < 0) {
|
||||||
vmwareError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Failed to write vmx file '%s'"), vmxPath);
|
_("Failed to write vmx file '%s'"), vmxPath);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -656,7 +656,7 @@ vmwareDomainCreateWithFlags(virDomainPtr dom,
|
|||||||
if (!vm) {
|
if (!vm) {
|
||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||||
virUUIDFormat(dom->uuid, uuidstr);
|
virUUIDFormat(dom->uuid, uuidstr);
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN,
|
virReportError(VIR_ERR_NO_DOMAIN,
|
||||||
_("No domain with matching uuid '%s'"), uuidstr);
|
_("No domain with matching uuid '%s'"), uuidstr);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -665,7 +665,7 @@ vmwareDomainCreateWithFlags(virDomainPtr dom,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (virDomainObjIsActive(vm)) {
|
if (virDomainObjIsActive(vm)) {
|
||||||
vmwareError(VIR_ERR_OPERATION_INVALID,
|
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("Domain is already running"));
|
"%s", _("Domain is already running"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -702,13 +702,13 @@ vmwareDomainUndefineFlags(virDomainPtr dom,
|
|||||||
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
char uuidstr[VIR_UUID_STRING_BUFLEN];
|
||||||
|
|
||||||
virUUIDFormat(dom->uuid, uuidstr);
|
virUUIDFormat(dom->uuid, uuidstr);
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN,
|
virReportError(VIR_ERR_NO_DOMAIN,
|
||||||
_("no domain with matching uuid '%s'"), uuidstr);
|
_("no domain with matching uuid '%s'"), uuidstr);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!vm->persistent) {
|
if (!vm->persistent) {
|
||||||
vmwareError(VIR_ERR_OPERATION_INVALID,
|
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
"%s", _("cannot undefine transient domain"));
|
"%s", _("cannot undefine transient domain"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -750,7 +750,7 @@ vmwareDomainLookupByID(virConnectPtr conn, int id)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, NULL);
|
virReportError(VIR_ERR_NO_DOMAIN, NULL);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -776,7 +776,7 @@ vmwareGetOSType(virDomainPtr dom)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, NULL);
|
virReportError(VIR_ERR_NO_DOMAIN, NULL);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,7 +802,7 @@ vmwareDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, NULL);
|
virReportError(VIR_ERR_NO_DOMAIN, NULL);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,7 +828,7 @@ vmwareDomainLookupByName(virConnectPtr conn, const char *name)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, NULL);
|
virReportError(VIR_ERR_NO_DOMAIN, NULL);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -853,7 +853,7 @@ vmwareDomainIsActive(virDomainPtr dom)
|
|||||||
obj = virDomainFindByUUID(&driver->domains, dom->uuid);
|
obj = virDomainFindByUUID(&driver->domains, dom->uuid);
|
||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, NULL);
|
virReportError(VIR_ERR_NO_DOMAIN, NULL);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
ret = virDomainObjIsActive(obj);
|
ret = virDomainObjIsActive(obj);
|
||||||
@@ -876,7 +876,7 @@ vmwareDomainIsPersistent(virDomainPtr dom)
|
|||||||
obj = virDomainFindByUUID(&driver->domains, dom->uuid);
|
obj = virDomainFindByUUID(&driver->domains, dom->uuid);
|
||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, NULL);
|
virReportError(VIR_ERR_NO_DOMAIN, NULL);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
ret = obj->persistent;
|
ret = obj->persistent;
|
||||||
@@ -902,7 +902,7 @@ vmwareDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, "%s",
|
virReportError(VIR_ERR_NO_DOMAIN, "%s",
|
||||||
_("no domain with matching uuid"));
|
_("no domain with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -928,7 +928,7 @@ vmwareDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
|
|||||||
virCheckFlags(0, NULL);
|
virCheckFlags(0, NULL);
|
||||||
|
|
||||||
if (STRNEQ(nativeFormat, "vmware-vmx")) {
|
if (STRNEQ(nativeFormat, "vmware-vmx")) {
|
||||||
vmwareError(VIR_ERR_INVALID_ARG,
|
virReportError(VIR_ERR_INVALID_ARG,
|
||||||
_("Unsupported config format '%s'"), nativeFormat);
|
_("Unsupported config format '%s'"), nativeFormat);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -1029,7 +1029,7 @@ vmwareDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, "%s",
|
virReportError(VIR_ERR_NO_DOMAIN, "%s",
|
||||||
_("no domain with matching uuid"));
|
_("no domain with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
@@ -1067,7 +1067,7 @@ vmwareDomainGetState(virDomainPtr dom,
|
|||||||
vmwareDriverUnlock(driver);
|
vmwareDriverUnlock(driver);
|
||||||
|
|
||||||
if (!vm) {
|
if (!vm) {
|
||||||
vmwareError(VIR_ERR_NO_DOMAIN, "%s",
|
virReportError(VIR_ERR_NO_DOMAIN, "%s",
|
||||||
_("no domain with matching uuid"));
|
_("no domain with matching uuid"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user