pub async fn sys_debug_read(
        &self,
        handle: HandleValue,
        mut buf: UserOutPtr<u8>,
        buf_size: u32,
        mut actual: UserOutPtr<u32>,
    ) -> ZxResult {
        info!(
            "debug.read: handle={:#x}, buf=({:?}; {:#x})",
            handle, buf, buf_size
        );
        let proc = self.thread.proc();
        proc.get_object::<Resource>(handle)?
            .validate(ResourceKind::ROOT)?;
        let mut vec = vec![0u8; buf_size as usize];
        let len = kernel_hal::console::console_read(&mut vec).await;
        buf.write_array(&vec[..len])?;
        actual.write(len as u32)?;
        Ok(())
    }
/// Read debug info from the serial port.
Read debug info from the serial port.
Read debug info from the serial port .
pub async fn sys_debug_read(
        &self,
        handle: HandleValue,
        mut buf: UserOutPtr<u8>,
        buf_size: u32,
        mut actual: UserOutPtr<u32>,
    ) -> ZxResult {
        info!(
            "debug.read: handle={:#x}, buf=({:?}; {:#x})",
            handle, buf, buf_size
        );
        let proc = self.thread.proc();
        proc.get_object::<Resource>(handle)?
            .validate(ResourceKind::ROOT)?;
        let mut vec = vec![0u8; buf_size as usize];
        let len = kernel_hal::console::console_read(&mut vec).await;
        buf.write_array(&vec[..len])?;
        actual.write(len as u32)?;
        Ok(())
    }
pub async fn sys_debug_read ( & self , handle : HandleValue , mut buf : UserOutPtr < u8 > , buf_size : u32 , mut actual : UserOutPtr < u32 > , ) -> ZxResult { info ! ( " " handle buf buf_size ) ; let proc = self . thread . proc ( ) ; proc . get_object :: < Resource > ( handle ) ? . validate ( ResourceKind :: ROOT ) ? ; let mut vec = vec ! [ 0u8 buf_size as usize ] ; let len = kernel_hal :: console :: console_read ( & mut vec ) . await ; buf . write_array ( & vec [ .. len ] ) ? ; actual . write ( len as u32 ) ? ; Ok ( ( ) ) }
Read debug info from the serial port.
Read debug info from the serial port .
&self
handle
HandleValue
buf
UserOutPtr<u8>
buf_size
u32
actual
UserOutPtr<u32>
&self
handle
HandleValue
buf
UserOutPtr<u8>
buf_size
u32
actual
UserOutPtr<u32>