[][src]Function syscall::scheme::calc_seek_offset_usize

pub fn calc_seek_offset_usize(
    cur_offset: usize,
    pos: isize,
    whence: usize,
    buf_len: usize
) -> Result<isize>

Helper for seek calls In most cases it's easier to use a usize to track the offset and buffer size internally, but the seek interface uses isize. This wrapper ensures EOVERFLOW errors are returned as appropriate if the value in the usize can't fit in the isize.