Lines Matching refs:len
78 len: usize, in read_at()
82 if buf.len() < len { in read_at()
110 if len < inode.valid_cnt as usize { in read_at()
111 end = (len + inode.read_pos as usize) % PIPE_BUFF_SIZE; in read_at()
112 num = len; in read_at()
145 metadata.size = inode.data.len() as i64; in metadata()
157 len: usize, in write_at()
161 if buf.len() < len || len > PIPE_BUFF_SIZE { in write_at()
170 while len + inode.valid_cnt as usize > PIPE_BUFF_SIZE { in write_at()
186 let end = (inode.write_pos as usize + len) % PIPE_BUFF_SIZE; in write_at()
191 inode.data[0..end].copy_from_slice(&buf[(PIPE_BUFF_SIZE - start)..len]); in write_at()
193 inode.data[start..end].copy_from_slice(&buf[0..len]); in write_at()
196 inode.write_pos = (inode.write_pos + len as i32) % PIPE_BUFF_SIZE as i32; in write_at()
197 inode.valid_cnt += len as i32; in write_at()
202 return Ok(len); in write_at()