Commit 5454cec
committed
kernel_cmdline: Refactor into separate
Split the kernel command line parsing functionality into two focused
modules. The `bytes` module handles raw byte parsing without UTF-8
requirements, matching kernel behavior for arbitrary byte
sequences. The `utf8` module provides string-based parsing for cases
where UTF-8 validation is needed. The `utf8` module reuses the
`bytes` module primitives where possible, and uses the fact that
`utf8::Cmdline` can only be constructed from valid UTF-8 to do
unchecked conversions between the two.
Signed-off-by: John Eckersberg <jeckersb@redhat.com>bytes and utf8 modules1 parent 4335ba1 commit 5454cec
4 files changed
Lines changed: 956 additions & 670 deletions
0 commit comments