[lxc-devel] [PATCH 6/8] Don't display an error in lxc_file_for_each_line
Daniel Lezcano
daniel.lezcano at free.fr
Sun Oct 3 21:46:35 UTC 2010
Don't display an error when the callback returns an error different
from zero. A value greater than zero may means "stop". Let's the caller
to check the error.
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
---
src/lxc/parse.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/src/lxc/parse.c b/src/lxc/parse.c
index ee6b5de..10510c9 100644
--- a/src/lxc/parse.c
+++ b/src/lxc/parse.c
@@ -81,10 +81,8 @@ int lxc_file_for_each_line(const char *file, lxc_file_cb callback, void *data)
while (getline(&line, &len, f) != -1) {
err = callback(line, data);
- if (err) {
- ERROR("failed to process '%s'", line);
+ if (err)
break;
- }
}
if (line)
--
1.7.0.4
More information about the lxc-devel
mailing list