mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-04 07:39:39 +00:00 
			
		
		
		
	hypha: multiple cleanups to fix shared module
This commit is contained in:
		@ -1,7 +1,7 @@
 | 
			
		||||
use crate::image::ImageInfo;
 | 
			
		||||
use crate::shared::LaunchInfo;
 | 
			
		||||
use anyhow::Result;
 | 
			
		||||
use backhand::{FilesystemWriter, NodeHeader};
 | 
			
		||||
use hypha::LaunchInfo;
 | 
			
		||||
use log::trace;
 | 
			
		||||
use std::fs;
 | 
			
		||||
use std::fs::File;
 | 
			
		||||
 | 
			
		||||
@ -5,9 +5,9 @@ use crate::ctl::cfgblk::ConfigBlock;
 | 
			
		||||
use crate::image::cache::ImageCache;
 | 
			
		||||
use crate::image::name::ImageName;
 | 
			
		||||
use crate::image::{ImageCompiler, ImageInfo};
 | 
			
		||||
use crate::shared::{LaunchInfo, LaunchNetwork};
 | 
			
		||||
use advmac::MacAddr6;
 | 
			
		||||
use anyhow::{anyhow, Result};
 | 
			
		||||
use hypha::{LaunchInfo, LaunchNetwork};
 | 
			
		||||
use ipnetwork::Ipv4Network;
 | 
			
		||||
use loopdev::LoopControl;
 | 
			
		||||
use std::io::{Read, Write};
 | 
			
		||||
@ -114,10 +114,9 @@ impl Controller {
 | 
			
		||||
        let cmdline_options = [if debug { "debug" } else { "quiet" }, "elevator=noop"];
 | 
			
		||||
        let cmdline = cmdline_options.join(" ");
 | 
			
		||||
 | 
			
		||||
        let mac = MacAddr6::random()
 | 
			
		||||
            .to_string()
 | 
			
		||||
            .replace('-', ":")
 | 
			
		||||
            .to_lowercase();
 | 
			
		||||
        let mut mac = MacAddr6::random();
 | 
			
		||||
        mac.set_local(true);
 | 
			
		||||
        let mac = mac.to_string().replace('-', ":");
 | 
			
		||||
        let config = DomainConfig {
 | 
			
		||||
            backend_domid: 0,
 | 
			
		||||
            name: &name,
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,3 @@
 | 
			
		||||
pub mod autoloop;
 | 
			
		||||
pub mod ctl;
 | 
			
		||||
pub mod image;
 | 
			
		||||
pub mod shared;
 | 
			
		||||
 | 
			
		||||
@ -1,14 +0,0 @@
 | 
			
		||||
use serde::{Deserialize, Serialize};
 | 
			
		||||
 | 
			
		||||
#[derive(Serialize, Deserialize, Debug)]
 | 
			
		||||
pub struct LaunchNetwork {
 | 
			
		||||
    pub link: String,
 | 
			
		||||
    pub ipv4: String,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#[derive(Serialize, Deserialize, Debug)]
 | 
			
		||||
pub struct LaunchInfo {
 | 
			
		||||
    pub network: Option<LaunchNetwork>,
 | 
			
		||||
    pub env: Option<Vec<String>>,
 | 
			
		||||
    pub run: Option<Vec<String>>,
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user