From: Kern Sibbald Date: Mon, 23 Oct 2017 16:26:02 +0000 (+0200) Subject: Add missing copy-plugin-confs for regress X-Git-Tag: Release-9.0.5~38 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=66fae9059bb3f26f1944b25a32c8a199ded9f70f;p=bacula%2Fbacula Add missing copy-plugin-confs for regress --- diff --git a/bacula/src/findlib/bfile.c b/bacula/src/findlib/bfile.c index 067677dc45..3c6e611874 100644 --- a/bacula/src/findlib/bfile.c +++ b/bacula/src/findlib/bfile.c @@ -582,6 +582,7 @@ int bclose(BFILE *bfd) stat = plugin_bclose(bfd); bfd->fid = -1; bfd->cmd_plugin = false; + return stat; } #if defined(HAVE_POSIX_FADVISE) && defined(POSIX_FADV_DONTNEED) @@ -626,10 +627,13 @@ ssize_t bwrite(BFILE *bfd, void *buf, size_t count) ssize_t stat; if (bfd->cmd_plugin && plugin_bwrite) { - return plugin_bwrite(bfd, buf, count); + stat = plugin_bwrite(bfd, buf, count); + + } else { + stat = write(bfd->fid, buf, count); + bfd->berrno = errno; } - stat = write(bfd->fid, buf, count); - bfd->berrno = errno; + bfd->block++; if (stat > 0) { bfd->total_bytes += stat; diff --git a/regress/scripts/copy-plugin-confs b/regress/scripts/copy-plugin-confs new file mode 100755 index 0000000000..40b4a0ac35 --- /dev/null +++ b/regress/scripts/copy-plugin-confs @@ -0,0 +1,8 @@ +#!/bin/sh +cp -f scripts/plugin-test-bacula-dir.conf ${conf}/bacula-dir.conf +cp -f scripts/test-bacula-sd.conf ${conf}/bacula-sd.conf +cp -f scripts/test-bacula-fd.conf ${conf}/bacula-fd.conf +cp -f scripts/test-console.conf ${conf}/bconsole.conf +cp -f scripts/test-console.conf ${conf}/bat.conf + +scripts/set_tape_options