Skip to content
Snippets Groups Projects
Commit c4ae10f0 authored by Julien Leduc's avatar Julien Leduc
Browse files

36acfd9a5b7a2818732586f70c85a29b7819ca15 LabelSession::LabelSession import

parent 50411a33
No related branches found
No related tags found
No related merge requests found
......@@ -39,9 +39,15 @@ namespace castor {
const unsigned short max_unix_hostname_length = 256; //255 + 1 terminating character
LabelSession::LabelSession(tapeserver::drive::DriveInterface & drive, const std::string &vid) {
LabelSession::LabelSession(tapeserver::drive::DriveInterface & drive,
const std::string &vid, const bool lbp) {
VOL1 vol1;
vol1.fill(vid, SCSI::logicBlockProtectionMethod::DoNotUse);
if (lbp) {
// we only support crc32c LBP method
vol1.fill(vid, SCSI::logicBlockProtectionMethod::CRC32C);
} else {
vol1.fill(vid, SCSI::logicBlockProtectionMethod::DoNotUse);
}
drive.writeBlock(&vol1, sizeof(vol1));
HDR1PRELABEL prelabel;
prelabel.fill(vid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment