Initialize the SCSI command properly

This fixes Sense Code:              Illegal Request (0x05)
Source:
https://serverfault.com/questions/864580/what-could-cause-a-sense-error-when-setting-lto-encryption
This commit is contained in:
User Lan at serverfault.com
2018-02-14 05:03:03 +01:00
committed by Jonas Stein
parent 6992ff74de
commit 3cbc9a1dd5

View File

@@ -261,6 +261,7 @@ bool SCSIWriteEncryptOptions(string tapeDevice, SCSIEncryptOptions* eOptions){
//create the key descriptor
if(eOptions->keyName!=""){
SSP_KAD kad;
memset(&kad,0,sizeof(kad));
kad.type=0x00;
kad.authenticated=0;
//set the descriptor length to the length of the keyName