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

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

 



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@xxxxxxxxxxxxx>
> ---
>  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

--
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]