Re: [PATCH revision RFC 1/2] lxc: Fix return values of veth.c functions

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

 



On Thu, Jul 29, 2010 at 12:18:23PM -0400, Laine Stump wrote:
> From: Ryota Ozaki <ozaki.ryota@xxxxxxxxx>
> 
> Previously, the functions in src/lxc/veth.c could sometimes return
> positive values on failure rather than -1. This made accurate error
> reporting difficult, and led to one failure to catch an error in a
> calling function.
> 
> This patch makes all the functions in veth.c consistently return 0 on
> success, and -1 on failure. It also fixes up the callers to the veth.c
> functions where necessary.
> 
> Note that this patch may be related to the bug:
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=607496.
> 
> It would not fix the bug, but would unveil what happens.
> 
> * po/POTFILES.in - add veth.c, which previously had no translatable strings
> * src/lxc/lxc_controller.c
> * src/lxc/lxc_container.c
> * src/lxc/lxc_driver.c    - fixup callers to veth.c, and remove error logs,
>                             as they are now done in veth.c
> * src/lxc/veth.c - make all functions consistently return -1 on error.
> * src/lxc/veth.h - use ATTRIBUTE_NONNULL to protect against NULL args.
> ---
>  po/POTFILES.in           |    1 +
>  src/lxc/lxc_container.c  |   12 +----
>  src/lxc/lxc_controller.c |   11 +----
>  src/lxc/lxc_driver.c     |   22 +++------
>  src/lxc/veth.c           |  117 ++++++++++++++++++++++++++-------------------
>  src/lxc/veth.h           |   19 +++++--
>  6 files changed, 94 insertions(+), 88 deletions(-)

  ACK looks fine to me,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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