On Wed, Apr 10, 2019 at 3:30 AM Cole Robinson <crobinso@redhat.com> wrote:
You missed v2 in the subject. format-patch -v2 or send-email -v2 will
add it.

Patch subjects should be short, 50 chars is the goal though sometimes
that's not practical. This is a good set of guidelines:
https://chris.beams.io/posts/git-commit/

Thanks for your reminder :)
My commit messages aren't great either, but I pushed your patch with
this commit message:


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.


Thanks,
Cole


On 4/9/19 6:01 AM, Han Han wrote:
> Signed-off-by: Han Han <hhan@redhat.com>
> ---
>  src/esx/esx_driver.c       | 4 ++--
>  src/vmware/vmware_driver.c | 2 +-
>  src/vmx/vmx.h              | 2 ++
>  3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index 08d33b6f3b..d80fef0a58 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> @@ -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;
> diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
> index f4b0989afd..1bc8a06c39 100644
> --- a/src/vmware/vmware_driver.c
> +++ b/src/vmware/vmware_driver.c
> @@ -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;
> diff --git a/src/vmx/vmx.h b/src/vmx/vmx.h
> index cb99e84d18..8c068b4cb2 100644
> --- a/src/vmx/vmx.h
> +++ b/src/vmx/vmx.h
> @@ -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);
>


- Cole


--
Best regards,
-----------------------------------
Han Han
Quality Engineer
Redhat.

Email: hhan@redhat.com
Phone: +861065339333