config: support backslash-newline line continuation (#611) - #625
config: support backslash-newline line continuation (#611)#625Mobeen0119 wants to merge 1 commit into
Conversation
|
This is the third time you have created this PR. Can you please just amend/rebase new changes and force push them instead of recreating the PR everytime? |
|
Yes This Please 🙏 |
|
I would suggest improving performance when It should skip lines that don't contain kernel command lines instead of checking every single line. |
|
This pipeline already runs multiple full-buffer passes before mine (hash check, continuation-collapse, whitespace trim, macro load, macro expand), so mine isn't adding a new category of cost and skipping non-cmdline lines isn't possible at this point since nothing's tokenized into lines yet. Worth noticing: the whitespace-trim loop right after mine is actually O(n²), not O(n) ... it shifts the entire remaining buffer on every skip event, which is the bigger perf risk on large configs, and it's pre-existing. |
cbba523 to
4cc83d7
Compare
Add backslash-newline line continuation to config parser.
O(n) two-pointer approach.
Handles Unix (\n) and Windows (\r\n) line endings.
Example:
CMDLINE: root=/dev/sda1 rw quiet
zswap.enabled=0
Becomes one continuous line.
Tested with 20 unit tests + 100K fuzz + 50K comparisons vs old code.
Fixes #611
Test Files :
test_compare.c
test_full.c