]> git.sur5r.net Git - bacula/bacula/commitdiff
Add missing copy-plugin-confs for regress
authorKern Sibbald <kern@sibbald.com>
Mon, 23 Oct 2017 16:26:02 +0000 (18:26 +0200)
committerKern Sibbald <kern@sibbald.com>
Mon, 23 Oct 2017 16:26:02 +0000 (18:26 +0200)
bacula/src/findlib/bfile.c
regress/scripts/copy-plugin-confs [new file with mode: 0755]

index 067677dc45d70cc69e61d0d6a1deb1dc5c18ca96..3c6e611874fcdc66a95f14c9f4ccfe876b753758 100644 (file)
@@ -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 (executable)
index 0000000..40b4a0a
--- /dev/null
@@ -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