pub fn sys_pwrite(
        &self,
        fd: FileDesc,
        base: UserInPtr<u8>,
        len: usize,
        offset: u64,
    ) -> SysResult {
        info!(
            "pwrite: fd={:?}, base={:?}, len={}, offset={}",
            fd, base, len, offset
        );
        let proc = self.linux_process();
        let buf = base.read_array(len)?;
        let file_like = proc.get_file_like(fd)?;
        let len = file_like.write_at(offset, &buf)?;
        Ok(len)
    }
/// writes up to count bytes from the buffer
/// starting at buf to the file descriptor fd at offset offset. The file offset is not changed.
writes up to count bytes from the buffer
starting at buf to the file descriptor fd at offset offset. The file offset is not changed.
writes up to count bytes from the buffer starting at buf to the file descriptor fd at offset offset . The file offset is not changed .
pub fn sys_pwrite(
        &self,
        fd: FileDesc,
        base: UserInPtr<u8>,
        len: usize,
        offset: u64,
    ) -> SysResult {
        info!(
            "pwrite: fd={:?}, base={:?}, len={}, offset={}",
            fd, base, len, offset
        );
        let proc = self.linux_process();
        let buf = base.read_array(len)?;
        let file_like = proc.get_file_like(fd)?;
        let len = file_like.write_at(offset, &buf)?;
        Ok(len)
    }
pub fn sys_pwrite ( & self , fd : FileDesc , base : UserInPtr < u8 > , len : usize , offset : u64 , ) -> SysResult { info ! ( " " fd base len offset ) ; let proc = self . linux_process ( ) ; let buf = base . read_array ( len ) ? ; let file_like = proc . get_file_like ( fd ) ? ; let len = file_like . write_at ( offset , & buf ) ? ; Ok ( len ) }
writes up to count bytes from the buffer
starting at buf to the file descriptor fd at offset offset.
writes up to count bytes from the buffer starting at buf to the file descriptor fd at offset offset .
&self
fd
FileDesc
base
UserInPtr<u8>
len
usize
offset
u64
&self
fd
FileDesc
base
UserInPtr<u8>
len
usize
offset
u64