parse: handle \r

Closes #2838. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 4d2e88ee
......@@ -131,7 +131,7 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback, void *da
}
ret = 0;
lxc_iterate_parts(line, buf, "\n\0") {
lxc_iterate_parts(line, buf, "\r\n\0") {
ret = callback(line, data);
if (ret) {
/* Callback rv > 0 means stop here callback rv < 0 means
......
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