Re: [Libvirt][PATCH] ESX: Fix ESX_VI__TEMPLATE__DYNAMIC_DEEP_COPY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/7/19 Ata E Husain Bohra <ata.husain@xxxxxxxxxxx>:
> Fix addresses two issues:
> 1. Fix generator code to allow deep copy operation for objects with
>    Dynamic_Cast capabilities.
> 2. Add missing deep copy routine to Long datatype.
> Signed-off-by: Ata E Husain Bohra <ata.husain@xxxxxxxxxxx>

True, deep copy + dynamic dispatch is broken. This combination wasn't
tested as no VI type used it until now.

> index 844fb65..8211c93 100644
> --- a/src/esx/esx_vi_types.c
> +++ b/src/esx/esx_vi_types.c
> @@ -549,6 +549,21 @@
>      }
>
>
> +#define ESX_VI__TEMPLATE__DEEPCOPY_DISPATCH(_actual_type, __type, _dispatch,  \
> +                                            _error_return)                    \
> +    switch (_actual_type) {                                                   \
> +      _dispatch                                                               \
> +                                                                              \
> +      case esxVI_Type_##__type:                                               \
> +        break;                                                                \
> +                                                                              \
> +      default:                                                                \
> +        ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,                                  \
> +                     _("Call to %s for unexpected type '%s'"), __FUNCTION__,  \
> +                     esxVI_Type_ToString(_actual_type));                      \
> +        return _error_return;                                                 \
> +    }
> +

No need for this extra copy of the ESX_VI__TEMPLATE__DISPATCH macro,
I'll remove it before pushing.

ACK and pushed, thanks.

-- 
Matthias Bolte
http://photron.blogspot.com

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]