Commit dcffbb94 authored by Steven Murray's avatar Steven Murray Committed by Cedric Caffy
Browse files

Made MediaType.primaryDensityCode and secondaryDensityCode optional

parent fb948fc3
......@@ -61,12 +61,12 @@ struct MediaType {
/**
* The primary SCSI density code.
*/
std::uint8_t primaryDensityCode;
cta::optional<std::uint8_t> primaryDensityCode;
/**
* The secondary SCSI density code.
*/
std::uint8_t secondaryDensityCode;
cta::optional<std::uint8_t> secondaryDensityCode;
/**
* The number of tape wraps.
......
......@@ -76,8 +76,8 @@ int MediaTypeLsStream::fillBuffer(XrdSsiPb::OStreamBuffer<Data> *streambuf) {
mt_item->set_name(mt.name);
mt_item->set_cartridge(mt.cartridge);
mt_item->set_capacity(mt.capacityInBytes);
mt_item->set_primary_density_code(mt.primaryDensityCode);
mt_item->set_secondary_density_code(mt.secondaryDensityCode);
if (mt.primaryDensityCode) mt_item->set_primary_density_code(mt.primaryDensityCode.value());
if (mt.secondaryDensityCode) mt_item->set_secondary_density_code(mt.secondaryDensityCode.value());
if (mt.nbWraps) mt_item->set_number_of_wraps(mt.nbWraps.value());
if (mt.minLPos) mt_item->set_min_lpos(mt.minLPos.value());
if (mt.maxLPos) mt_item->set_max_lpos(mt.maxLPos.value());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment