]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
!! handle the Jmsg at an upper level when required
authorAlain Spineux <alain@baculasystems.com>
Fri, 6 Jan 2023 16:11:13 +0000 (17:11 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:00 +0000 (13:57 +0200)
The goal is to allow the "next_volume" to work in a backup and in last
resort to finish by a mount request

This Jmsg was handy, it was avoiding to handle the error a the caller level
and sometime at the caller+2 level
Here they are

DEVICE::load_encryption_key(DCR *, const char *, const char *, u_int32_t *, unsigned char *, u_int32_t *, unsigned char *) : bool
DEVICE::read_dev_volume_label(DCR *) : int
acquire_device_for_read(DCR *, u_int32_t) : bool
aligned_dev::read_dev_volume_label(DCR *) : int
cloud_dev::read_dev_volume_label(DCR *) : int
DCR::check_volume_label(bool &, bool &) : int
device_initialization(void *) : void *
label_volume_if_ok(DCR *, char *, char *, char *, int, int) : void
mount_cmd(JCR *) : bool
read_label(DCR *) : bool
read_volume_label(JCR *, DCR *, DEVICE *, int) : void
readlabelcmd() : void
DEVICE::rewrite_volume_label(DCR *, bool) : bool
cloud_dev::rewrite_volume_label(DCR *, bool) : bool
DCR::mount_next_write_volume() : bool
DEVICE::write_volume_label(DCR *, const char *, const char *, bool, bool) : bool
cloud_dev::write_volume_label(DCR *, const char *, const char *, bool, bool) : bool
DCR::try_autolabel(bool) : int
label_volume_if_ok(DCR *, char *, char *, char *, int, int) : void
labelcmd() : void

bacula/src/stored/dev.c

index 54bd25a29630d4b530ad61244b2c2e98b982d93f..920137f50283de40530f7bfe243f1ce9bd34ade9 100644 (file)
@@ -1411,8 +1411,10 @@ bool DEVICE::load_encryption_key(DCR *dcr, const char *operation,
    }
    if (err_msg.c_str()[0] != '\0') {
       Dmsg2(10, "load encryption key for volume %s Err=%s\n", dcr->VolumeName, err_msg.c_str());
+#if 0
       Jmsg(jcr, M_FATAL, 0, _("3992 Bad LoadEncryptionKey %s Volume \"%s\": "
            "ERR=%s\n"), operation, dcr->VolumeName, err_msg.c_str());
+#endif
       if (jcr != NULL) {
          Mmsg(jcr->errmsg, _("3992 Bad LoadEncryptionKey %s Volume \"%s\": "
                "ERR=%s\n"), operation, dcr->VolumeName, err_msg.c_str());