pub const REPORT_LUNS: u8 = 0xA0;
pub mod select_report {
pub const ALL: u8 = 0x00;
pub const WELL_KNOWN: u8 = 0x01;
pub const ALL_MAPPED: u8 = 0x02;
}
#[inline]
pub fn fill_report_luns(
cdb: &mut [u8; 16],
select: u8,
allocation_len: u32,
control: u8,
) {
cdb.fill(0);
cdb[0] = REPORT_LUNS;
cdb[1] = 0x00; cdb[2] = select;
let [b6, b7, b8, b9] = allocation_len.to_be_bytes();
cdb[6] = b6;
cdb[7] = b7;
cdb[8] = b8;
cdb[9] = b9;
cdb[11] = control;
}
#[inline]
pub fn fill_report_luns_simple(cdb: &mut [u8; 16], allocation_len: u32) {
fill_report_luns(cdb, select_report::ALL, allocation_len, 0x00)
}