mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 21:21:32 +00:00
implement support for creating domains
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
mod sys;
|
||||
pub mod domctl;
|
||||
pub mod sys;
|
||||
|
||||
use crate::sys::Hypercall;
|
||||
use nix::errno::Errno;
|
||||
@ -60,9 +61,9 @@ impl XenCall {
|
||||
|
||||
pub fn hypercall(&mut self, op: c_ulong, arg: [c_ulong; 5]) -> Result<c_long, XenCallError> {
|
||||
unsafe {
|
||||
let mut call = Hypercall { op, arg, retval: 0 };
|
||||
sys::hypercall(self.handle.as_raw_fd(), &mut call)?;
|
||||
Ok(call.retval)
|
||||
let mut call = Hypercall { op, arg };
|
||||
let result = sys::hypercall(self.handle.as_raw_fd(), &mut call)?;
|
||||
Ok(result as c_long)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user