feat: rework to support multiple platforms

This commit is contained in:
Alex Zenla
2024-05-05 07:27:35 -07:00
parent 2f69f339bc
commit e60fb29f52
11 changed files with 366 additions and 177 deletions

View File

@ -1,6 +1,7 @@
use std::{env, process};
use tokio::fs;
use xenclient::error::Result;
use xenclient::x86pvh::X86PvhPlatform;
use xenclient::{DomainConfig, XenClient};
#[tokio::main]
@ -14,7 +15,7 @@ async fn main() -> Result<()> {
}
let kernel_image_path = args.get(1).expect("argument not specified");
let initrd_path = args.get(2).expect("argument not specified");
let client = XenClient::open(0).await?;
let client = XenClient::new(0, X86PvhPlatform::new()).await?;
let config = DomainConfig {
backend_domid: 0,
name: "xenclient-test".to_string(),