pub(super) fn read_bytes_helper<T: Task>(
    task: &mut T,
    addr: RemotePtr<Void>,
    buf: &mut [u8],
    maybe_ok: Option<&mut bool>,
) {
    // pread64 etc can't handle addresses that appear to be negative ...
    // like [vsyscall].
    let result_nread = task.read_bytes_fallible(addr, buf);
    match result_nread {
        Ok(nread) if nread == buf.len() => (),
        _ => {
            let nread = result_nread.unwrap_or(0);
            match maybe_ok {
                Some(ok) => *ok = false,
                None => {
                    ed_assert!(
                        task,
                        false,
                        "Should have read {} bytes from {}, but only read {}",
                        buf.len(),
                        addr,
                        nread
                    );
                }
            }
        }
    }
}
/// Forwarded method definition
///
/// If the data can't all be read, then if `maybe_ok` is None, asserts otherwise
/// sets the inner mutable bool to false.
Forwarded method definition
If the data can't all be read, then if `maybe_ok` is None, asserts otherwise
sets the inner mutable bool to false.
Forwarded method definition If the data can ' t all be read then if ` maybe_ok ` is None asserts otherwise sets the inner mutable bool to false .
pub(super) fn read_bytes_helper<T: Task>(
    task: &mut T,
    addr: RemotePtr<Void>,
    buf: &mut [u8],
    maybe_ok: Option<&mut bool>,
) {
    // pread64 etc can't handle addresses that appear to be negative ...
    // like [vsyscall].
    let result_nread = task.read_bytes_fallible(addr, buf);
    match result_nread {
        Ok(nread) if nread == buf.len() => (),
        _ => {
            let nread = result_nread.unwrap_or(0);
            match maybe_ok {
                Some(ok) => *ok = false,
                None => {
                    ed_assert!(
                        task,
                        false,
                        "Should have read {} bytes from {}, but only read {}",
                        buf.len(),
                        addr,
                        nread
                    );
                }
            }
        }
    }
}
pub ( super ) fn read_bytes_helper < T : Task > ( task : & mut T , addr : RemotePtr < Void > , buf : & mut [ u8 ] , maybe_ok : Option < & mut bool > , ) { // pread64 etc can't handle addresses that appear to be negative ... // like [vsyscall]. let result_nread = task . read_bytes_fallible ( addr , buf ) ; match result_nread { Ok ( nread ) if nread == buf . len ( ) => ( ) , _ => { let nread = result_nread . unwrap_or ( 0 ) ; match maybe_ok { Some ( ok ) => * ok = false , None => { ed_assert ! ( task false " " buf len ( ) addr nread ) ; } } } } }
Forwarded method definition
If the data can't all be read, then if `maybe_ok` is None, asserts otherwise
sets the inner mutable bool to false.
Forwarded method definition If the data can ' t all be read then if ` maybe_ok ` is None asserts otherwise sets the inner mutable bool to false .
task
&mut T
addr
RemotePtr<Void>
buf
&mut [u8]
maybe_ok
Option<&mut bool>