]> git.sur5r.net Git - bacula/bacula/commitdiff
Add more debug to block.c when read rejected
authorKern Sibbald <kern@sibbald.com>
Sat, 9 Jun 2012 09:40:45 +0000 (11:40 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:50:47 +0000 (14:50 +0200)
bacula/src/stored/block.c

index 72a9d82d95e99c4308307b7e94badeb67cf007b4..0660c79d9f4d33017c24ab743a11b4d4a02b45c4 100644 (file)
@@ -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;
     }