]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport bacula/src/stored/tape_dev.c
authorKern Sibbald <kern@sibbald.com>
Tue, 12 May 2020 19:23:24 +0000 (21:23 +0200)
committerEric Bollengier <eric@baculasystems.com>
Thu, 29 Apr 2021 08:44:18 +0000 (10:44 +0200)
This commit is the result of the squash of the following main commits:

bacula/src/stored/tape_dev.c

index 58e728db5d2e71c3565cebfe67b28cfe008f1b6f..7b323cc1a7256ea0ffc5a3d9014f35399662462b 100644 (file)
@@ -838,6 +838,10 @@ bool DEVICE::bsr(int num)
 void tape_dev::lock_door()
 {
 #ifdef MTLOCK
+   /* ***BEEF ***/
+   if (device->lock_command && device->control_name) {
+      return;    /* Locked using SCSI persistent locks */
+   }
    struct mtop mt_com;
    if (!is_tape()) return;
    mt_com.mt_op = MTLOCK;
@@ -849,6 +853,10 @@ void tape_dev::lock_door()
 void tape_dev::unlock_door()
 {
 #ifdef MTUNLOCK
+   /* ***BEEF ***/
+   if (device->lock_command && device->control_name) {
+      return;    /* Locked using SCSI persistent locks */
+   }
    struct mtop mt_com;
    if (!is_tape()) return;
    mt_com.mt_op = MTUNLOCK;