Skip to content

Commit 6d214f0

Browse files
Update src/fs/uhyve.rs
Co-authored-by: Martin Kröning <[email protected]>
1 parent 54c52ed commit 6d214f0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/fs/uhyve.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,9 @@ pub(crate) fn init() {
234234
info!("Try to initialize uhyve filesystem");
235235
if is_uhyve() {
236236
let mount_str = env::fdt().and_then(|fdt| {
237-
fdt.find_node("/uhyve,mounts").and_then(|node| {
238-
node.property("mounts")
239-
.and_then(|property| str::from_utf8(property.value).ok())
240-
})
237+
fdt.find_node("/uhyve,mounts")
238+
.and_then(|node| node.property("mounts"))
239+
.and_then(|property| property.as_str())
241240
});
242241
if let Some(mount_str) = mount_str {
243242
assert_ne!(mount_str.len(), 0, "Invalid /uhyve,mounts node in FDT");

0 commit comments

Comments
 (0)