build: Bump linux-loader from 0.5.0 to 0.6.0

Bumps [linux-loader](https://github.com/rust-vmm/linux-loader) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/rust-vmm/linux-loader/releases)
- [Changelog](https://github.com/rust-vmm/linux-loader/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-vmm/linux-loader/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: linux-loader
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-09-24 10:09:20 +01:00 committed by dependabot[bot]
parent 76903e5fd0
commit 66c092e69b
4 changed files with 10 additions and 7 deletions

4
Cargo.lock generated
View File

@ -547,9 +547,9 @@ dependencies = [
[[package]]
name = "linux-loader"
version = "0.5.0"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "85feaf25cc99be9662ab951bc68a10ae4436dbc9ba931b7fcb4e8fde67d9aa24"
checksum = "62a2f912deca034ec34b0a43a390059ea98daac40e440ebe8bea88f3315fe168"
dependencies = [
"vm-memory",
]

View File

@ -13,7 +13,7 @@ anyhow = "1.0.65"
byteorder = "1.4.3"
hypervisor = { path = "../hypervisor" }
libc = "0.2.133"
linux-loader = { version = "0.5.0", features = ["elf", "bzimage", "pe"] }
linux-loader = { version = "0.6.0", features = ["elf", "bzimage", "pe"] }
log = "0.4.17"
serde = { version = "1.0.145", features = ["rc", "derive"] }
thiserror = "1.0.35"

View File

@ -29,7 +29,7 @@ gdbstub = { version = "0.6.3", optional = true }
gdbstub_arch = { version = "0.2.4", optional = true }
hypervisor = { path = "../hypervisor" }
libc = "0.2.133"
linux-loader = { version = "0.5.0", features = ["elf", "bzimage", "pe"] }
linux-loader = { version = "0.6.0", features = ["elf", "bzimage", "pe"] }
log = "0.4.17"
micro_http = { git = "https://github.com/firecracker-microvm/micro-http", branch = "main" }
net_util = { path = "../net_util" }

View File

@ -1306,7 +1306,7 @@ impl Vm {
arch::configure_system(
&mem,
cmdline.as_str(),
cmdline.as_cstring().unwrap().to_str().unwrap(),
vcpu_mpidrs,
vcpu_topology,
device_info,
@ -1992,8 +1992,11 @@ impl Vm {
let cmdline = Self::generate_cmdline(
self.config.lock().unwrap().payload.as_ref().unwrap(),
)?;
mem.write_slice(cmdline.as_str().as_bytes(), GuestAddress(section.address))
.unwrap();
mem.write_slice(
cmdline.as_cstring().unwrap().as_bytes_with_nul(),
GuestAddress(section.address),
)
.unwrap();
}
_ => {}
}