mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-03 23:29:39 +00:00 
			
		
		
		
	container: implement exit code xenbus notification
This commit is contained in:
		@ -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?;
 | 
			
		||||
 | 
			
		||||
@ -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?;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user