mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-21 08:26:30 +00:00
Refactor the read/write operations to userspace
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
09b6153d29
commit
af908c29cf
@ -752,6 +752,10 @@ impl<R1, R2> VmarMapOptions<R1, R2> {
|
||||
if self.align % PAGE_SIZE != 0 || !self.align.is_power_of_two() {
|
||||
return_errno_with_message!(Errno::EINVAL, "invalid align");
|
||||
}
|
||||
debug_assert!(self.size % self.align == 0);
|
||||
if self.size % self.align != 0 {
|
||||
return_errno_with_message!(Errno::EINVAL, "invalid mapping size");
|
||||
}
|
||||
debug_assert!(self.vmo_offset % self.align == 0);
|
||||
if self.vmo_offset % self.align != 0 {
|
||||
return_errno_with_message!(Errno::EINVAL, "invalid vmo offset");
|
||||
|
Reference in New Issue
Block a user