]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/dvd.c
kes Remove Encryption and Accurate lines in vbackup output -- not used.
[bacula/bacula] / bacula / src / stored / dvd.c
index 3413850bf80a1bc5ef024a6ff029b934ab4d54fc..0496359b4a48b6f940595836754e61b266d052d4 100644 (file)
@@ -1,23 +1,14 @@
-/*
- *
- *   dvd.c  -- Routines specific to DVD devices (and
- *             possibly other removable hard media). 
- *
- *    Nicolas Boichat, MMV
- *
- *   Version $Id$
- */
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2005-2006 Free Software Foundation Europe e.V.
+   Copyright (C) 2005-2008 Free Software Foundation Europe e.V.
 
    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
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Bacula® is a registered trademark of John Walker.
+   Bacula® is a registered trademark of Kern Sibbald.
    The licensor of Bacula is the Free Software Foundation Europe
    (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
    Switzerland, email:ftf@fsfeurope.org.
 */
+/*
+ *
+ *   dvd.c  -- Routines specific to DVD devices (and
+ *             possibly other removable hard media). 
+ *
+ *    Nicolas Boichat, MMV
+ *
+ *   Version $Id$
+ */
 
 #include "bacula.h"
 #include "stored.h"
@@ -254,7 +254,7 @@ bool dvd_write_part(DCR *dcr)
    }
 
    Dmsg2(20, "Write part: cmd=%s timeout=%d\n", ocmd.c_str(), timeout);
-   status = run_program_full_output(ocmd.c_str(), timeout, results.c_str());
+   status = run_program_full_output(ocmd.c_str(), timeout, results.addr());
    Dmsg2(20, "Write part status=%d result=%s\n", status, results.c_str());
 
    dev->blank_dvd = false;
@@ -266,7 +266,7 @@ bool dvd_write_part(DCR *dcr)
       Dmsg1(100, "%s\n", dev->errmsg);
       dev->dev_errno = EIO;
       if (!dev->truncating) {
-         mark_volume_in_error(dcr);
+         dcr->mark_volume_in_error();
       }
       sm_check(__FILE__, __LINE__, false);
       return false;
@@ -486,7 +486,7 @@ boffset_t lseek_dvd(DCR *dcr, boffset_t offset, int whence)
       break;
    case SEEK_CUR:
       Dmsg1(400, "lseek_dvd SEEK_CUR to %s\n", edit_int64(offset, ed1));
-      if ((pos = lseek(dev->fd(), (off_t)0, SEEK_CUR)) < 0) {
+      if ((pos = lseek(dev->fd(), 0, SEEK_CUR)) < 0) {
          Dmsg0(400, "Seek error.\n");
          return pos;                  
       }
@@ -518,7 +518,7 @@ boffset_t lseek_dvd(DCR *dcr, boffset_t offset, int whence)
        *  right part number, simply seek
        */
       if (dev->is_part_spooled() && dev->part > dev->num_dvd_parts) {
-         if ((pos = lseek(dev->fd(), (off_t)0, SEEK_END)) < 0) {
+         if ((pos = lseek(dev->fd(), 0, SEEK_END)) < 0) {
             return pos;   
          } else {
             Dmsg1(400, "lseek_dvd SEEK_END returns %s\n", 
@@ -686,7 +686,7 @@ bool truncate_dvd(DCR *dcr)
    dcr->VolCatInfo.VolCatBytes = 0;
 
    /* Update catalog */
-   if (!dir_update_volume_info(dcr, false)) {
+   if (!dir_update_volume_info(dcr, false, true)) {
       return false;
    }