From 321412fbe0b958a5e3205f5b2ff52f81b209ef3c Mon Sep 17 00:00:00 2001 From: piotrpalcz Date: Mon, 20 Nov 2023 12:49:17 +0000 Subject: [PATCH] Fixing missplaced use statements and missing Cargo crates --- src/runtime-boot/init/Cargo.toml | 2 ++ src/runtime-boot/init/src/main.rs | 7 ++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/runtime-boot/init/Cargo.toml b/src/runtime-boot/init/Cargo.toml index 2715bbc9..99b0de90 100644 --- a/src/runtime-boot/init/Cargo.toml +++ b/src/runtime-boot/init/Cargo.toml @@ -8,3 +8,5 @@ edition = "2018" libc = "0.2.147" serde = { version = "1.0.183", features = ["derive"] } serde_json = "1.0.104" +nix = { version = "0.26" } +anyhow = { version = "1.0", default-features = false } \ No newline at end of file diff --git a/src/runtime-boot/init/src/main.rs b/src/runtime-boot/init/src/main.rs index eee0dfa1..73310611 100644 --- a/src/runtime-boot/init/src/main.rs +++ b/src/runtime-boot/init/src/main.rs @@ -4,7 +4,7 @@ extern crate serde_json; use libc::syscall; -use anyhow::{anyhow, Result}; +use anyhow::Result; use nix::mount::MsFlags; use std::error::Error; use std::ffi::CString; @@ -13,11 +13,8 @@ use std::fs::File; use std::io::prelude::*; use std::io::{ErrorKind, Read}; -use anyhow::{anyhow, Result}; -use std::ffi::CString; -use std::fs; use std::mem::size_of; -use std::path::{Path, PathBuf}; +use std::path::Path; fn main() -> Result<(), Box> { let rootfs_upper_layer = "/sefs/upper";