]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
BEE Backport bacula/src/stored/autochanger.c
authorKern Sibbald <kern@sibbald.com>
Tue, 12 May 2020 16:57:39 +0000 (18:57 +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:

Author: Kern Sibbald <kern@sibbald.com>
Date:   Thu Jan 19 14:01:30 2012 +0100

    Start adding BEEF, pull files from Branch-5.2

Author: Kern Sibbald <kern@sibbald.com>
Date:   Wed Nov 23 11:32:27 2011 +0100

    Add new SD plugin code + shared storage plugin

bacula/src/stored/autochanger.c

index efc972b65d18a7d1e29f6c67bfe5b5d9cbdfb004..51f299054489795901af4dd3e5956a7751043096 100644 (file)
@@ -21,6 +21,7 @@
  *  Routines for handling the autochanger.
  *
  *   Written by Kern Sibbald, August MMII
+ *
  */
 
 #include "bacula.h"                   /* pull in global headers */
@@ -51,7 +52,7 @@ bool init_autochangers()
       foreach_alist(device, changer->device) {
          /*
           * If the device does not have a changer name or changer command
-          *   defined, use the one from the Autochanger resource
+          *   defined, used the one from the Autochanger resource
           */
          if (!device->changer_name && changer->changer_name) {
             device->changer_name = bstrdup(changer->changer_name);
@@ -59,6 +60,9 @@ bool init_autochangers()
          if (!device->changer_command && changer->changer_command) {
             device->changer_command = bstrdup(changer->changer_command);
          }
+         if (!device->lock_command && changer->lock_command) {
+            device->lock_command = bstrdup(changer->lock_command);
+         }
          if (!device->changer_name) {
             Jmsg(NULL, M_ERROR, 0,
                _("No Changer Name given for device %s. Cannot continue.\n"),
@@ -152,7 +156,7 @@ int autoload_device(DCR *dcr, bool writing, BSOCK *dir)
   } else if (!dcr->device->changer_command) {
       /* Suppress info when polling */
       if (!dev->poll) {
-         Jmsg(jcr, M_INFO, 0, _("No \"Changer Command\" for %s. Manual load of Volume may be requird.\n"),
+         Jmsg(jcr, M_INFO, 0, _("No \"Changer Command\" for %s. Manual load of Volume may be required.\n"),
               dev->print_name());
       }
       rtn_stat = 0;