提交 9895f001 编写于 作者: H Han Han 提交者: Cole Robinson

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: NCole Robinson <crobinso@redhat.com>
Signed-off-by: NHan Han <hhan@redhat.com>
上级 9009858d
...@@ -2710,7 +2710,7 @@ esxConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat, ...@@ -2710,7 +2710,7 @@ esxConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
memset(&data, 0, sizeof(data)); memset(&data, 0, sizeof(data));
if (STRNEQ(nativeFormat, "vmware-vmx")) { if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
virReportError(VIR_ERR_INVALID_ARG, virReportError(VIR_ERR_INVALID_ARG,
_("Unsupported config format '%s'"), nativeFormat); _("Unsupported config format '%s'"), nativeFormat);
return NULL; return NULL;
...@@ -2755,7 +2755,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat, ...@@ -2755,7 +2755,7 @@ esxConnectDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
memset(&data, 0, sizeof(data)); memset(&data, 0, sizeof(data));
if (STRNEQ(nativeFormat, "vmware-vmx")) { if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
virReportError(VIR_ERR_INVALID_ARG, virReportError(VIR_ERR_INVALID_ARG,
_("Unsupported config format '%s'"), nativeFormat); _("Unsupported config format '%s'"), nativeFormat);
return NULL; return NULL;
......
...@@ -956,7 +956,7 @@ vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat, ...@@ -956,7 +956,7 @@ vmwareConnectDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
virCheckFlags(0, NULL); virCheckFlags(0, NULL);
if (STRNEQ(nativeFormat, "vmware-vmx")) { if (STRNEQ(nativeFormat, VMX_CONFIG_FORMAT_ARGV)) {
virReportError(VIR_ERR_INVALID_ARG, virReportError(VIR_ERR_INVALID_ARG,
_("Unsupported config format '%s'"), nativeFormat); _("Unsupported config format '%s'"), nativeFormat);
return NULL; return NULL;
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
# include "virconf.h" # include "virconf.h"
# include "domain_conf.h" # include "domain_conf.h"
# define VMX_CONFIG_FORMAT_ARGV "vmware-vmx"
typedef struct _virVMXContext virVMXContext; typedef struct _virVMXContext virVMXContext;
virDomainXMLOptionPtr virVMXDomainXMLConfInit(void); virDomainXMLOptionPtr virVMXDomainXMLConfInit(void);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册