Lines Matching refs:blk
27 use virtio_drivers::device::blk::SECTOR_SIZE;
74 pub fn read_block(&mut self, index: usize, blk: &mut [u8]) -> Result<()> { in read_block()
76 self.partitions.read_block(index, blk) in read_block()
79 pub fn write_block(&mut self, index: usize, blk: &[u8]) -> Result<()> { in write_block()
81 self.partitions.write_block(index, blk) in write_block()
102 let mut blk = [0; Self::LBA_SIZE]; in new() localVariable
103 device.read_block(Header::LBA, &mut blk).map_err(Error::FailedRead)?; in new()
104 let (header_bytes, _) = blk.split_at(size_of::<Header>()); in new()
122 let mut blk = [0; Self::LBA_SIZE]; in get_partition_by_name() localVariable
126 self.read_block(i, &mut blk)?; in get_partition_by_name()
127 let entries = blk.as_ptr().cast::<Entry>(); in get_partition_by_name()
142 fn read_block(&mut self, index: usize, blk: &mut [u8]) -> Result<()> { in read_block()
143 self.device.read_block(index, blk).map_err(Error::FailedRead) in read_block()
146 fn write_block(&mut self, index: usize, blk: &[u8]) -> Result<()> { in write_block()
147 self.device.write_block(index, blk).map_err(Error::FailedWrite) in write_block()