mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 21:00:55 +00:00
fix(examples): use architecture cfg for boot example
This commit is contained in:
parent
11a34d4834
commit
02b97cff6d
@ -1,9 +1,14 @@
|
||||
use std::{env, process};
|
||||
use tokio::fs;
|
||||
use xenclient::error::Result;
|
||||
use xenclient::x86pv::X86PvPlatform;
|
||||
use xenclient::{DomainConfig, XenClient};
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
type RuntimePlatform = xenclient::x86pv::X86PvPlatform;
|
||||
|
||||
#[cfg(not(target_arch = "x86_64"))]
|
||||
type RuntimePlatform = xenclient::unsupported::UnsupportedPlatform;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
env_logger::init();
|
||||
@ -15,7 +20,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::new(0, X86PvPlatform::new()).await?;
|
||||
let client = XenClient::new(0, RuntimePlatform::new()).await?;
|
||||
let config = DomainConfig {
|
||||
backend_domid: 0,
|
||||
name: "xenclient-test".to_string(),
|
||||
|
Loading…
Reference in New Issue
Block a user