pub fn sys_debuglog_create(
        &self,
        rsrc: HandleValue,
        options: u32,
        mut target: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "debuglog.create: resource_handle={:#x?}, options={:#x?}",
            rsrc, options,
        );
        let proc = self.thread.proc();
        if rsrc != 0 {
            proc.get_object::<Resource>(rsrc)?
                .validate(ResourceKind::ROOT)?;
        }
        let dlog = DebugLog::create(options);
        const FLAG_READABLE: u32 = 0x4000_0000u32;
        let dlog_right = if options & FLAG_READABLE == 0 {
            Rights::DEFAULT_DEBUGLOG
        } else {
            Rights::DEFAULT_DEBUGLOG | Rights::READ
        };
        let dlog_handle = proc.add_handle(Handle::new(dlog, dlog_right));
        target.write(dlog_handle)?;
        Ok(())
    }
/// Create a kernel managed debuglog reader or writer.
Create a kernel managed debuglog reader or writer.
Create a kernel managed debuglog reader or writer .
pub fn sys_debuglog_create(
        &self,
        rsrc: HandleValue,
        options: u32,
        mut target: UserOutPtr<HandleValue>,
    ) -> ZxResult {
        info!(
            "debuglog.create: resource_handle={:#x?}, options={:#x?}",
            rsrc, options,
        );
        let proc = self.thread.proc();
        if rsrc != 0 {
            proc.get_object::<Resource>(rsrc)?
                .validate(ResourceKind::ROOT)?;
        }
        let dlog = DebugLog::create(options);
        const FLAG_READABLE: u32 = 0x4000_0000u32;
        let dlog_right = if options & FLAG_READABLE == 0 {
            Rights::DEFAULT_DEBUGLOG
        } else {
            Rights::DEFAULT_DEBUGLOG | Rights::READ
        };
        let dlog_handle = proc.add_handle(Handle::new(dlog, dlog_right));
        target.write(dlog_handle)?;
        Ok(())
    }
pub fn sys_debuglog_create ( & self , rsrc : HandleValue , options : u32 , mut target : UserOutPtr < HandleValue > , ) -> ZxResult { info ! ( " " rsrc options ) ; let proc = self . thread . proc ( ) ; if rsrc != 0 { proc . get_object :: < Resource > ( rsrc ) ? . validate ( ResourceKind :: ROOT ) ? ; } let dlog = DebugLog :: create ( options ) ; const FLAG_READABLE : u32 = 0x4000_0000u32 ; let dlog_right = if options & FLAG_READABLE == 0 { Rights :: DEFAULT_DEBUGLOG } else { Rights :: DEFAULT_DEBUGLOG | Rights :: READ } ; let dlog_handle = proc . add_handle ( Handle :: new ( dlog , dlog_right ) ) ; target . write ( dlog_handle ) ? ; Ok ( ( ) ) }
Create a kernel managed debuglog reader or writer.
Create a kernel managed debuglog reader or writer .
&self
rsrc
HandleValue
options
u32
target
UserOutPtr<HandleValue>
&self
rsrc
HandleValue
options
u32
target
UserOutPtr<HandleValue>