mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-04 05:31:32 +00:00
more hvm work
This commit is contained in:
@ -23,7 +23,7 @@ async fn main() -> Result<()> {
|
||||
mem_mb: 512,
|
||||
kernel: fs::read(&kernel_image_path).await?,
|
||||
initrd: fs::read(&initrd_path).await?,
|
||||
cmdline: "console=hvc0 debug earlyprintk=xen,keep loglevel=10".to_string(),
|
||||
cmdline: "earlyprintk=xen earlycon=xen console=hvc0 init=/init".to_string(),
|
||||
swap_console_backend: None,
|
||||
disks: vec![],
|
||||
channels: vec![],
|
||||
|
@ -169,12 +169,7 @@ impl XenClient {
|
||||
created: &CreateDomain,
|
||||
config: &DomainConfig,
|
||||
) -> Result<CreatedDomain> {
|
||||
trace!(
|
||||
"XenClient init domid={} domain={:?} config={:?}",
|
||||
domid,
|
||||
created,
|
||||
config
|
||||
);
|
||||
trace!("XenClient init domid={} domain={:?}", domid, created,);
|
||||
let backend_dom_path = self.store.get_domain_path(0).await?;
|
||||
let dom_path = self.store.get_domain_path(domid).await?;
|
||||
let uuid_string = Uuid::from_bytes(created.handle).to_string();
|
||||
|
@ -108,7 +108,6 @@ impl XsdClient {
|
||||
}
|
||||
|
||||
async fn write<P: AsRef<str>>(&self, tx: u32, path: P, data: Vec<u8>) -> Result<bool> {
|
||||
trace!("write tx={tx} path={} data={:?}", path.as_ref(), data);
|
||||
let mut buffer = Vec::new();
|
||||
let path = CString::new(path.as_ref())?;
|
||||
buffer.extend_from_slice(path.as_bytes_with_nul());
|
||||
@ -120,6 +119,11 @@ impl XsdClient {
|
||||
response.parse_bool()
|
||||
}
|
||||
|
||||
async fn write_string<P: AsRef<str>>(&self, tx: u32, path: P, data: &str) -> Result<bool> {
|
||||
trace!("write tx={tx} path={} data=\"{}\"", path.as_ref(), data);
|
||||
self.write(tx, path, data.as_bytes().to_vec()).await
|
||||
}
|
||||
|
||||
async fn mkdir<P: AsRef<str>>(&self, tx: u32, path: P) -> Result<bool> {
|
||||
trace!("mkdir tx={tx} path={}", path.as_ref());
|
||||
self.socket
|
||||
@ -247,7 +251,7 @@ impl XsdInterface for XsdClient {
|
||||
}
|
||||
|
||||
async fn write_string<P: AsRef<str>>(&self, path: P, data: &str) -> Result<bool> {
|
||||
self.write(0, path, data.as_bytes().to_vec()).await
|
||||
self.write_string(0, path, data).await
|
||||
}
|
||||
|
||||
async fn mkdir<P: AsRef<str>>(&self, path: P) -> Result<bool> {
|
||||
@ -287,9 +291,7 @@ impl XsdInterface for XsdTransaction {
|
||||
}
|
||||
|
||||
async fn write_string<P: AsRef<str>>(&self, path: P, data: &str) -> Result<bool> {
|
||||
self.client
|
||||
.write(self.tx, path, data.as_bytes().to_vec())
|
||||
.await
|
||||
self.client.write_string(self.tx, path, data).await
|
||||
}
|
||||
|
||||
async fn mkdir<P: AsRef<str>>(&self, path: P) -> Result<bool> {
|
||||
|
Reference in New Issue
Block a user