pub fn sys_vmo_write(
        &self,
        handle_value: HandleValue,
        buf: UserInPtr<u8>,
        offset: u64,
        buf_size: usize,
    ) -> ZxResult {
        info!(
            "vmo.write: handle={:#x?}, offset={:#x?}, buf=({:#x?}; {:#x?})",
            handle_value, offset, buf, buf_size,
        );
        let proc = self.thread.proc();
        let vmo = proc.get_object_with_rights::<VmObject>(handle_value, Rights::WRITE)?;
        if offset as usize > vmo.len() || buf_size > vmo.len() - (offset as usize) {
            return Err(ZxError::OUT_OF_RANGE);
        }
        vmo.write(offset as usize, &buf.read_array(buf_size)?)?;
        Ok(())
    }
/// Write bytes to a VMO.
Write bytes to a VMO.
Write bytes to a VMO .
pub fn sys_vmo_write(
        &self,
        handle_value: HandleValue,
        buf: UserInPtr<u8>,
        offset: u64,
        buf_size: usize,
    ) -> ZxResult {
        info!(
            "vmo.write: handle={:#x?}, offset={:#x?}, buf=({:#x?}; {:#x?})",
            handle_value, offset, buf, buf_size,
        );
        let proc = self.thread.proc();
        let vmo = proc.get_object_with_rights::<VmObject>(handle_value, Rights::WRITE)?;
        if offset as usize > vmo.len() || buf_size > vmo.len() - (offset as usize) {
            return Err(ZxError::OUT_OF_RANGE);
        }
        vmo.write(offset as usize, &buf.read_array(buf_size)?)?;
        Ok(())
    }
pub fn sys_vmo_write ( & self , handle_value : HandleValue , buf : UserInPtr < u8 > , offset : u64 , buf_size : usize , ) -> ZxResult { info ! ( " " handle_value offset buf buf_size ) ; let proc = self . thread . proc ( ) ; let vmo = proc . get_object_with_rights :: < VmObject > ( handle_value , Rights :: WRITE ) ? ; if offset as usize > vmo . len ( ) || buf_size > vmo . len ( ) - ( offset as usize ) { return Err ( ZxError :: OUT_OF_RANGE ) ; } vmo . write ( offset as usize , & buf . read_array ( buf_size ) ? ) ? ; Ok ( ( ) ) }
Write bytes to a VMO.
Write bytes to a VMO .
&self
handle_value
HandleValue
buf
UserInPtr<u8>
offset
u64
buf_size
usize
&self
handle_value
HandleValue
buf
UserInPtr<u8>
offset
u64
buf_size
usize