mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-30 18:03:32 +00:00
vmx: Define VMX_CONFIG_FORMAT_ARGV
Define VMX_CONFIG_FORMAT_ARGV to replace the hardcoded 'vmware-vmx' string used by the domxml-X-native APIs. This follows the pattern used by other drivers. Reviewed-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Han Han <hhan@redhat.com>
This commit is contained in:
parent
9009858d5b
commit
9895f00126
@ -2710,7 +2710,7 @@ esxConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
if (STRNEQ(nativeFormat, "vmware-vmx")) {
|
||||
if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("Unsupported config format '%s'"), nativeFormat);
|
||||
return NULL;
|
||||
@ -2755,7 +2755,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
|
||||
|
||||
memset(&data, 0, sizeof(data));
|
||||
|
||||
if (STRNEQ(nativeFormat, "vmware-vmx")) {
|
||||
if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("Unsupported config format '%s'"), nativeFormat);
|
||||
return NULL;
|
||||
|
@ -956,7 +956,7 @@ vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
|
||||
|
||||
virCheckFlags(0, NULL);
|
||||
|
||||
if (STRNEQ(nativeFormat, "vmware-vmx")) {
|
||||
if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("Unsupported config format '%s'"), nativeFormat);
|
||||
return NULL;
|
||||
|
@ -26,6 +26,8 @@
|
||||
# include "virconf.h"
|
||||
# include "domain_conf.h"
|
||||
|
||||
# define VMX_CONFIG_FORMAT_ARGV "vmware-vmx"
|
||||
|
||||
typedef struct _virVMXContext virVMXContext;
|
||||
|
||||
virDomainXMLOptionPtr virVMXDomainXMLConfInit(void);
|
||||
|
Loading…
Reference in New Issue
Block a user