Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FdtWriter::property_cstring #72

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 21, 2024

  1. Add FdtWriter::property_cstring

    Since FdtWriter only accept &str, it does a validation to make sure
    it's NULL-terminated and copies the whole string in Cstring::new().
    
    This is unnecessary in some circumstances. For example, for "bootargs"
    property, linux_loader can create CString [1]. However, library users
    need to convert it into String [2].
    
    This patches adds another property helper `property_cstring`, which
    accepts a &CStr value directly.
    
    [1] https://docs.rs/linux-loader/latest/linux_loader/cmdline/struct.Cmdline.html#method.as_cstring
    [2] https://github.com/firecracker-microvm/firecracker/blob/3853362520b81efc8ce6559148d023379a5a4da4/src/vmm/src/arch/aarch64/fdt.rs#L240-L246
    
    Signed-off-by: Seiya Nuta <[email protected]>
    nuta committed May 21, 2024
    Configuration menu
    Copy the full SHA
    99b8be6 View commit details
    Browse the repository at this point in the history
  2. Update CHANGELOG.md

    Signed-off-by: Seiya Nuta <[email protected]>
    nuta committed May 21, 2024
    Configuration menu
    Copy the full SHA
    fd645bc View commit details
    Browse the repository at this point in the history