new_remote_file

Function new_remote_file 

Source
pub fn new_remote_file<L>(
    locked: &mut Locked<L>,
    current_task: &CurrentTask,
    handle: NullableHandle,
    flags: OpenFlags,
) -> Result<FileHandle, Errno>
Expand description

Create a file handle from a zx::NullableHandle.

The handle must be a channel, socket, vmo or debuglog object. If the handle is a channel, then the channel must implement the fuchsia.unknown/Queryable protocol.

The resulting object will be owned by root, and will have permissions derived from the flags used to open this object. This is not the same as the permissions set if the object was created using Starnix itself. We use this mainly for interfacing with objects created outside of Starnix where these flags represent the desired permissions already.