Am 31.03.20 um 17:05 schrieb Martin Simmons: >>>>>> On Tue, 31 Mar 2020 12:40:04 +0200, Pierre Bernhardt said: >> >> Am 30.03.20 um 16:12 schrieb Martin Simmons: >> Hello, >>
>> >> I think the return line should be corrected by changing the false? I'm >> virgin coding >> c++ ;-) >> >> if (block->block_len > block->read_len) { >> dev->dev_errno = EIO; >> Mmsg4(dev->errmsg, _("[SE0208] Volume has data error at %u:%u! Short >> block of %d bytes on device %s discarded.\n"), >> dev->file, dev->block_num, block->read_len, dev->print_name()); >> Jmsg(jcr, M_INFO, 0, "%s", dev->errmsg); >> dev->set_short_block(); >> block->read_len = block->binbuf = 0; >> return true; /* return error */ >> } > > No, returning true will not work correctly -- the calling function must get > false for a short block. Ok. For the moment I test it without any return value, but found allready another problem with the new binary, but this is another point. > Your change to use M_INFO looks correct, but the block.c:682 message in the > log still says "Error:" so you are still running the original code. Did you > run "make" and "make install" after changing the code? Did they complete > without errors (you might need to run "make install" as root)? Did you > restart the bacula-sd after that? I compiled all on my workstation by the debian way, means I created a modified deb, transfered it to the backup server and installed it by dpkg -i. I checked also the md5sum of the bin before and after the installation and the original installation differs from the new compiled version. > I also notice that there is another use of M_ERROR at line 160 of > read_records.c that causes a second error message: > > Jmsg1(jcr, M_ERROR, 0, "%s", dev->errmsg); > > This also needs to be changed to M_INFO. Will do it also and retest it. Also I will modify the message a little bit so I can check the message is really from the modified binary. Cheers, Pierre _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users