]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/block.c
Make cd accept wildcards
[bacula/bacula] / bacula / src / stored / block.c
index 9941e06b61424129fba800294a0162429ad64f02..e5ac2191a8758a5ca325c623ec60135d41285135 100644 (file)
@@ -6,7 +6,7 @@
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
-   modify it under the terms of version two of the GNU General Public
+   modify it under the terms of version three of the GNU Affero General Public
    License as published by the Free Software Foundation and included
    in the file LICENSE.
 
@@ -15,7 +15,7 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Affero General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
@@ -381,9 +381,6 @@ bool write_block_to_device(DCR *dcr)
 
    if (!write_block_to_dev(dcr)) {
        if (job_canceled(jcr) || jcr->getJobType() == JT_SYSTEM) {
-          if (jcr->getJobType() != JT_SYSTEM) {
-             terminate_writing_volume(dcr);
-          }
           stat = false;
        } else {
           stat = fixup_device_block_write_error(dcr);
@@ -419,7 +416,6 @@ bool write_block_to_dev(DCR *dcr)
    return true;
 #endif
    if (job_canceled(jcr)) {
-      terminate_writing_volume(dcr);
       return false;
    }
 
@@ -734,10 +730,6 @@ static bool terminate_writing_volume(DCR *dcr)
    DEVICE *dev = dcr->dev;
    bool ok = true;
 
-   if (dev->at_eot()) {
-      return true;
-  }
-
    /* Create a JobMedia record to indicated end of tape */
    dev->VolCatInfo.VolCatFiles = dev->file;
    if (!dir_create_jobmedia_record(dcr)) {
@@ -946,7 +938,6 @@ bool read_block_from_dev(DCR *dcr, bool check_block_numbers)
 {
    ssize_t stat;
    int looping;
-   uint32_t BlockNumber;
    int retry;
    JCR *jcr = dcr->jcr;
    DEVICE *dev = dcr->dev;
@@ -1051,7 +1042,7 @@ reread:
       return false;             /* return error */
    }
 
-   BlockNumber = block->BlockNumber + 1;
+// BlockNumber = block->BlockNumber + 1;
    if (!unser_block_header(jcr, dev, block)) {
       if (forge_on) {
          dev->file_addr += block->read_len;