Re: [PATCH] LXC: Fix return code evaulation in lxcCheckNetNsSupport()

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

 



On 04/08/2014 06:26 AM, Richard Weinberger wrote:
> Commit b9dd878f (util: make it easier to grab only regular command exit)
> changed the call semantics of virCommandRun() and therefore of virRun()
> too. But lxcCheckNetNsSupport() was not updated.
> As consequence of this lxcCheckNetNsSupport always failed and broke LXC.
> 
> Signed-off-by: Richard Weinberger <richard@xxxxxx>

ACK; will push shortly.

> 
> diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
> index b900bc6..de67004 100644
> --- a/src/lxc/lxc_driver.c
> +++ b/src/lxc/lxc_driver.c
> @@ -1475,8 +1475,7 @@ static int lxcCheckNetNsSupport(void)
>      const char *argv[] = {"ip", "link", "set", "lo", "netns", "-1", NULL};
>      int ip_rc;
>  
> -    if (virRun(argv, &ip_rc) < 0 ||
> -        !(WIFEXITED(ip_rc) && (WEXITSTATUS(ip_rc) != 255)))
> +    if (virRun(argv, &ip_rc) < 0 || ip_rc == 255)
>          return 0;
>  
>      if (lxcContainerAvailable(LXC_CONTAINER_FEATURE_NET) < 0)
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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