Skip to content

Commit b109981

Browse files
Traistaru Andrei Cristianandreeaflorescu
Traistaru Andrei Cristian
authored andcommitted
Reworking the Cmdline crate
Redesigning the Cmdline crate to be able to handle boot args and init args properly. The Cmdline struct now contains two strings which will store the boot args and init args separately. When the kernel command line is needed, we join those to strings, adding a ' -- ' delimiter between them. Signed-off-by: Traistaru Andrei Cristian <[email protected]>
1 parent 21d0180 commit b109981

File tree

4 files changed

+447
-100
lines changed

4 files changed

+447
-100
lines changed

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# [Unreleased]
2+
3+
## Added
4+
- Added `NoBootArgsInserted` error type used when calling `as_cstring` on a `Cmdline`
5+
containing only init args.
6+
- Added `InvalidCapacity` error type used when trying to create a `Cmdline`
7+
either with zero capacity (using `new` or `try_from`) or with smaller capacity
8+
than required for arguments (using `try_from`).
9+
- Added `insert_init_args` method allowing insertion of init arguments into `Cmdline`.
10+
11+
## Changed
12+
- Removed `InvalidDevice` error type (it wasn't used anywhere).
13+
- Replaced `From` with `TryFrom<Cmdline>` for `Vec<u8>` to be able
14+
to propagate errors returned by `as_cstring` when converting a `Cmdline` to `Vec<u8>`.
15+
- Support added for both boot and init arguments in `try_from`.
16+
- Changed `new` to return `Result` for invalid command line capacity handling.
17+
118
# [v0.6.0]
219

320
## Changed

coverage_config_x86_64.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"coverage_score": 76.2,
2+
"coverage_score": 77.6,
33
"exclude_path": "",
44
"crate_features": "bzimage,elf",
55
"exclude_path": "benches/,loader_gen/"

0 commit comments

Comments
 (0)