From 1dcf953f7aa7f98b8de035316574ab2114b4f406 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 9 Jun 2012 11:40:45 +0200 Subject: [PATCH] Add more debug to block.c when read rejected --- bacula/src/stored/block.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bacula/src/stored/block.c b/bacula/src/stored/block.c index 72a9d82d95..0660c79d9f 100644 --- a/bacula/src/stored/block.c +++ b/bacula/src/stored/block.c @@ -941,10 +941,14 @@ bool DCR::read_block_from_dev(bool check_block_numbers) DCR *dcr = this; if (job_canceled(jcr)) { + Mmsg(dev->errmsg, _("Job failed or canceled.\n")); + block->read_len = 0; return false; } if (dev->at_eot()) { + Mmsg(dev->errmsg, _("Attempt to read past end of tape or file.\n")); + block->read_len = 0; return false; } looping = 0; @@ -954,7 +958,7 @@ bool DCR::read_block_from_dev(bool check_block_numbers) if (!dev->is_open()) { Mmsg4(dev->errmsg, _("Attempt to read closed device: fd=%d at file:blk %u:%u on device %s\n"), dev->fd(), dev->file, dev->block_num, dev->print_name()); - Jmsg(dcr->jcr, M_FATAL, 0, "%s", dev->errmsg); + Jmsg(dcr->jcr, M_WARNING, 0, "%s", dev->errmsg); block->read_len = 0; return false; } -- 2.39.5