Lines Matching refs:buf
57 buf: &mut [u8], in read_at()
61 if count * 512 > buf.len() || check_length > u16::MAX as usize { in read_at()
98 let mut buf_ptr = buf as *mut [u8] as *mut usize as usize; in read_at()
102 let user_buf = if unsafe { verify_area(buf_ptr as u64, buf.len() as u64) } { in read_at()
108 let mut x: Vec<u8> = Vec::with_capacity(buf.len()); in read_at()
110 x.set_len(buf.len()); in read_at()
204 buf.copy_from_slice(kbuf.as_ref().unwrap()); in read_at()
216 buf: &[u8], in write_at()
220 if count * 512 > buf.len() || check_length > u16::MAX as usize { in write_at()
260 let mut buf_ptr = buf as *const [u8] as *mut usize as usize; in write_at()
264 let user_buf = if unsafe { verify_area(buf_ptr as u64, buf.len() as u64) } { in write_at()
270 let mut x: Vec<u8> = Vec::with_capacity(buf.len()); in write_at()
271 x.resize(buf.len(), 0); in write_at()
272 x.copy_from_slice(buf); in write_at()
406 let mut buf: Vec<u8> = Vec::new(); in read_mbr_table() localVariable
407 buf.resize(size_of::<MbrDiskPartionTable>(), 0); in read_mbr_table()
409 self.read_at(0, 1, &mut buf)?; in read_mbr_table()
412 let mut cursor = VecCursor::new(buf); in read_mbr_table()
454 buf: &mut [u8], in read_at()
460 return self.0.lock().read_at(lba_id_start, count, buf); in read_at()
468 buf: &[u8], in write_at()
470 self.0.lock().write_at(lba_id_start, count, buf) in write_at()