fn read_partitions(
        buf: &DmaBuf,
        header: &GPTHeader,
    ) -> Result<Vec<GptEntry>, LabelError> {
        let partitions =
            GptEntry::from_slice(buf.as_slice(), header.num_entries)?;
        if GptEntry::checksum(&partitions) != header.table_crc {
            return Err(LabelError::PartitionTableChecksum {});
        }
        Ok(partitions)
    }
/// construct partition table from raw data
construct partition table from raw data
construct partition table from raw data
fn read_partitions(
        buf: &DmaBuf,
        header: &GPTHeader,
    ) -> Result<Vec<GptEntry>, LabelError> {
        let partitions =
            GptEntry::from_slice(buf.as_slice(), header.num_entries)?;
        if GptEntry::checksum(&partitions) != header.table_crc {
            return Err(LabelError::PartitionTableChecksum {});
        }
        Ok(partitions)
    }
fn read_partitions ( buf : & DmaBuf , header : & GPTHeader , ) -> Result < Vec < GptEntry > , LabelError > { let partitions = GptEntry :: from_slice ( buf . as_slice ( ) , header . num_entries ) ? ; if GptEntry :: checksum ( & partitions ) != header . table_crc { return Err ( LabelError :: PartitionTableChecksum { } ) ; } Ok ( partitions ) }
construct partition table from raw data
construct partition table from raw data
buf
&DmaBuf
header
&GPTHeader