mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-03 23:29:39 +00:00 
			
		
		
		
	xenstore: watch support (#4)
This commit is contained in:
		@ -77,12 +77,16 @@ impl RuntimeContext {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    fn detect_guest_file(store: &str, name: &str) -> Result<String> {
 | 
			
		||||
        let path = PathBuf::from(format!("{}/{}", store, name));
 | 
			
		||||
        let mut path = PathBuf::from(format!("{}/guest/{}", store, name));
 | 
			
		||||
        if path.is_file() {
 | 
			
		||||
            return path_as_string(&path);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        Ok(format!("/usr/share/krata/guest/{}", name))
 | 
			
		||||
        path = PathBuf::from(format!("/usr/share/krata/guest/{}", name));
 | 
			
		||||
        if path.is_file() {
 | 
			
		||||
            return path_as_string(&path);
 | 
			
		||||
        }
 | 
			
		||||
        Err(anyhow!("unable to find required guest file: {}", name))
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    pub async fn list(&mut self) -> Result<Vec<GuestInfo>> {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user