]> git.sur5r.net Git - bacula/bacula/commitdiff
Final changes
authorKern Sibbald <kern@sibbald.com>
Fri, 1 Sep 2006 21:37:43 +0000 (21:37 +0000)
committerKern Sibbald <kern@sibbald.com>
Fri, 1 Sep 2006 21:37:43 +0000 (21:37 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3395 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/scripts/dvd-handler.in
bacula/src/stored/dev.c
bacula/src/stored/dvd.c

index 487598abed666a3b5d20e0cd86c363d76be902e2..54f5661f407e3abb2dc723f664b4505784861bec 100644 (file)
@@ -6,14 +6,34 @@
 #
 #  called:  dvd-handler <dvd-device-name> operation args
 #
-#  where operation is one of
-#    free
-#    write
+#  operations used by Bacula:
+#
+#   free  (no arguments)
+#            Scan the device and report the available space. It returns:
+#            Prints on the first output line the free space available in bytes.
+#            If an error occurs, prints a negative number (-errno), followed,
+#            on the second line, by an error message.
+#
+#   write  op filename
+#             Write a part file to disk.
+#             This operation needs two additional arguments.
+#             The first (op) indicates to
+#                 0 -- append
+#                 1 -- first write to a blank disk
+#                 2 -- blank or truncate a disk
+#
+#              The second is the filename to write
+#
+#   operations available but not used by Bacula:
+#
+#   test      Scan the device and report the information found.
+#             This operation needs no further arguments.
+#   prepare   Prepare a DVD+/-RW for being used by Bacula.
+#             Note: This is only useful if you already have some
+#             non-Bacula data on a medium, and you want to use
+#             it with Bacula. Don't run this on blank media, it
+#             is useless.
 #
-# in case of operation ``free'' returns:
-# Prints on the first output line the free space available in bytes.
-# If an error occurs, prints a negative number (-errno), followed,
-# on the second line, by an error message.
 # 
 # $Id$
 #
@@ -289,7 +309,7 @@ class disk:
       print
       signal.signal(signal.SIGTERM, oldsig)
       if not os.WIFEXITED(status):
-         raise DVDError(0, cmd + " process did not exit correctly, signal/status " + str(status))
+        raise DVDError(0, cmd + " process did not exit correctly, signal/status " + str(status))
       if os.WEXITSTATUS(status) != 0:
         raise DVDError(os.WEXITSTATUS(status), cmd + " exited with status " + str(os.WEXITSTATUS(status)) + ", signal/status " + str(status))
 
index 920a4ea01e9311531047dd42eca92f968259c5bf..1cdf259efc03ff39706c8e8ffd0eaee96c8e5f20 100644 (file)
@@ -526,8 +526,7 @@ void DEVICE::open_dvd_device(DCR *dcr, int omode)
      
    if (mount_dvd(this, 1)) {
       Dmsg0(99, "DVD device mounted.\n");
-      if ((num_dvd_parts == 0) && (!truncating)) {
-#ifdef needed
+      if (num_dvd_parts == 0 && !truncating) {
          /*
           * If we can mount the device, and we are not truncating the DVD, 
           * we usually want to abort. There is one exception, if there is 
@@ -541,7 +540,6 @@ void DEVICE::open_dvd_device(DCR *dcr, int omode)
             clear_opened();
             return;
          }
-#endif
          truncated_dvd = true;
       }
    } else {
index 298668240ddde8e329d4ca4347ccc6f3a9f6323c..6c826ba4c3ab1d118cfc497811d754334810f1f2 100644 (file)
@@ -434,8 +434,8 @@ bool dvd_write_part(DCR *dcr)
             dev->part, results.c_str());
     
    if (dev->truncated_dvd) {
-      dev->truncated_dvd = false;   /* turn off flag */
-   } else {                         /* DVD part written */
+      dev->truncated_dvd = false;      /* turn off flag */
+   } else {                            /* DVD part written */
       dev->num_dvd_parts++;            /* there is now one more part on DVD */
       dev->VolCatInfo.VolCatParts = dev->num_dvd_parts;
    }