continuation = mfree(continuation);
}
+ if (continuation) {
+ r = parse_line(unit,
+ filename,
+ ++line,
+ sections,
+ lookup,
+ table,
+ flags,
+ §ion,
+ §ion_line,
+ §ion_ignored,
+ continuation,
+ userdata);
+ if (r < 0) {
+ if (flags & CONFIG_PARSE_WARN)
+ log_warning_errno(r, "%s:%u: Failed to parse file: %m", filename, line);
+ return r;
+
+ }
+ }
+
return 0;
}
"2\\\n"
"3\n",
+ "[Section]\n"
+ "setting1=1\\\n" /* continuation with extra trailing backslash at the end */
+ "2\\\n"
+ "3\\\n",
+
"[Section]\n"
"setting1=1\\\\\\\n" /* continuation with trailing escape symbols */
"\\\\2\n", /* note that C requires one level of escaping, so the
x1000("ABCD") "\\\n"
"foobar",
+ "[Section]\n"
+ "setting1=" /* a line above LINE_MAX length, with continuation */
+ x1000("ABCD") "\\\n" /* and an extra trailing backslash */
+ "foobar\\\n",
+
"[Section]\n"
"setting1=" /* a line above the allowed limit: 9 + 1050000 + 1 */
x1000(x1000("x") x10("abcde")) "\n",
assert_se(streq(setting1, "1"));
break;
- case 4:
+ case 4 ... 5:
assert_se(r == 0);
assert_se(streq(setting1, "1 2 3"));
break;
- case 5:
+ case 6:
assert_se(r == 0);
assert_se(streq(setting1, "1\\\\ \\\\2"));
break;
- case 6:
+ case 7:
assert_se(r == 0);
assert_se(streq(setting1, x1000("ABCD")));
break;
- case 7:
+ case 8 ... 9:
assert_se(r == 0);
assert_se(streq(setting1, x1000("ABCD") " foobar"));
break;
- case 8 ... 9:
+ case 10 ... 11:
assert_se(r == -ENOBUFS);
assert_se(setting1 == NULL);
break;