container: implement exit code xenbus notification

This commit is contained in:
Alex Zenla
2024-02-23 04:48:44 +00:00
parent 79acf4e814
commit 496cdd37be
6 changed files with 19 additions and 17 deletions

View File

@ -27,6 +27,7 @@ async fn main() -> Result<()> {
vifs: vec![],
filesystems: vec![],
extra_keys: vec![],
extra_rw_paths: vec![],
event_channels: vec![],
};
let domid = client.create(&config).await?;

View File

@ -79,6 +79,7 @@ pub struct DomainConfig<'a> {
pub filesystems: Vec<DomainFilesystem<'a>>,
pub event_channels: Vec<DomainEventChannel<'a>>,
pub extra_keys: Vec<(String, String)>,
pub extra_rw_paths: Vec<String>,
}
impl XenClient {
@ -213,6 +214,11 @@ impl XenClient {
.await?;
}
for path in &config.extra_rw_paths {
tx.mknod(format!("{}/{}", dom_path, path).as_str(), rw_perm)
.await?;
}
tx.commit().await?;
}