async-ify xenstore and xenclient

This commit is contained in:
2024-02-23 04:37:53 +00:00
parent cf0b62c9f5
commit 79acf4e814
15 changed files with 395 additions and 294 deletions

View File

@@ -16,10 +16,11 @@ impl ControllerConsole<'_> {
pub async fn perform(&mut self, id: &str) -> Result<()> {
let info = self
.context
.resolve(id)?
.resolve(id)
.await?
.ok_or_else(|| anyhow!("unable to resolve container: {}", id))?;
let domid = info.domid;
let tty = self.context.xen.get_console_path(domid)?;
let tty = self.context.xen.get_console_path(domid).await?;
let console = XenConsole::new(&tty).await?;
console.attach().await?;
Ok(())