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

Re: [libvirt] [PATCH] parallels: delete old networks in prlsdkDoApplyConfig before adding new ones



On 06.04.2015 17:53, Maxim Nestratov wrote:
> In order to change an existing domain we delete all existing devices and add
> new from scratch. In case of network devices we should also delete corresponding
> virtual networks (if any) before removing actual devices from xml. In the patch,
> we do it by extending prlsdkDoApplyConfig with a new parameter, which stands for
> old xml, and calling prlsdkDelNet every time old xml is specified.
> 
> Signed-off-by: Maxim Nestratov <mnestratov parallels com>
> ---
>  src/parallels/parallels_sdk.c |   24 +++++++++++++++---------
>  1 files changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c
> index c36b772..64a2d15 100644
> --- a/src/parallels/parallels_sdk.c
> +++ b/src/parallels/parallels_sdk.c
> @@ -2935,7 +2935,8 @@ prlsdkAddFS(PRL_HANDLE sdkdom, virDomainFSDefPtr fs)
>  static int
>  prlsdkDoApplyConfig(virConnectPtr conn,
>                      PRL_HANDLE sdkdom,
> -                    virDomainDefPtr def)
> +                    virDomainDefPtr def,
> +                    virDomainDefPtr olddef)
>  {
>      PRL_RESULT pret;
>      size_t i;
> @@ -2997,6 +2998,16 @@ prlsdkDoApplyConfig(virConnectPtr conn,
>      if (prlsdkRemoveBootDevices(sdkdom) < 0)
>          goto error;
>  
> +    if(olddef) {

A missing space. 'make syntax-check' would have caught this.

Fixed, ACKed and pushed.

Michal


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