Commit 48e2f384 by Qiang Huang Committed by Serge Hallyn

When callback of one config line fail, we'd better give the exactly

info to help users locate the misconfig. Signed-off-by: 's avatarQiang Huang <h.huangqiang@huawei.com> Acked-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 49badbbe
...@@ -101,8 +101,10 @@ int lxc_file_for_each_line(const char *file, lxc_file_cb callback, void *data) ...@@ -101,8 +101,10 @@ int lxc_file_for_each_line(const char *file, lxc_file_cb callback, void *data)
while (getline(&line, &len, f) != -1) { while (getline(&line, &len, f) != -1) {
err = callback(line, data); err = callback(line, data);
if (err) if (err) {
ERROR("Failed to parse config: %s", line);
break; break;
}
} }
if (line) if (line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment