On Thu, Jul 29, 2010 at 12:18:23PM -0400, Laine Stump wrote:
From: Ryota Ozaki <ozaki.ryota(a)gmail.com>
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(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/