]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/bsr.c
Backport from Bacula Enterprise
[bacula/bacula] / bacula / src / dird / bsr.c
index 97d16076e3d92af50f0aa8c7f6d3804af24722f5..b24a28c84235b7e6c8addfdda8cda229e68431d4 100644 (file)
@@ -1,17 +1,21 @@
 /*
-   Bacula® - The Network Backup Solution
+   Bacula(R) - The Network Backup Solution
 
+   Copyright (C) 2000-2015 Kern Sibbald
    Copyright (C) 2002-2014 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.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
    You may use this file and others of this release according to the
    license defined in the LICENSE file, which includes the Affero General
    Public License, v3.0 ("AGPLv3") and some additional permissions and
    terms pursuant to its AGPLv3 Section 7.
 
-   Bacula® is a registered trademark of Kern Sibbald.
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
 /*
  *
@@ -50,7 +54,7 @@ static void free_findex(RBSR_FINDEX *fi)
    }
 }
 
-/*
+/* 
  * Get storage device name from Storage resource
  */
 static bool get_storage_device(char *device, char *storage)
@@ -59,7 +63,7 @@ static bool get_storage_device(char *device, char *storage)
    if (storage[0] == 0) {
       return false;
    }
-   store = (STORE *)GetResWithName(R_STORAGE, storage);
+   store = (STORE *)GetResWithName(R_STORAGE, storage);    
    if (!store) {
       return false;
    }
@@ -188,7 +192,7 @@ static void make_unique_restore_filename(UAContext *ua, POOL_MEM &fname)
    JCR *jcr = ua->jcr;
    int i = find_arg_with_value(ua, "bootstrap");
    if (i >= 0) {
-      Mmsg(fname, "%s", ua->argv[i]);
+      Mmsg(fname, "%s", ua->argv[i]);              
       jcr->unlink_bsr = false;
    } else {
       P(mutex);
@@ -237,7 +241,7 @@ uint32_t write_bsr_file(UAContext *ua, RESTORE_CTX &rx)
 
    ua->send_msg(_("Bootstrap records written to %s\n"), fname.c_str());
 
-   if (chk_dbglvl(10)) {
+   if (debug_level >= 10) {
       print_bsr(ua, rx);
    }
 
@@ -267,7 +271,7 @@ static void display_vol_info(UAContext *ua, RESTORE_CTX &rx, JobId_t JobId)
             } else {
                online = ' ';
             }
-            Mmsg(volmsg, "%c%-25s %-25s %-25s",
+            Mmsg(volmsg, "%c%-25s %-25s %-25s", 
                  online, bsr->VolParams[i].VolumeName,
                  bsr->VolParams[i].Storage, Device);
             add_prompt(ua, volmsg.c_str());
@@ -316,7 +320,7 @@ void display_bsr_info(UAContext *ua, RESTORE_CTX &rx)
 /*
  * Write bsr data for a single bsr record
  */
-static uint32_t write_bsr_item(RBSR *bsr, UAContext *ua,
+static uint32_t write_bsr_item(RBSR *bsr, UAContext *ua, 
                    RESTORE_CTX &rx, FILE *fd, bool &first, uint32_t &LastIndex)
 {
    char ed1[50], ed2[50];
@@ -381,7 +385,7 @@ static uint32_t write_bsr_item(RBSR *bsr, UAContext *ua,
  * Here we actually write out the details of the bsr file.
  *  Note, there is one bsr for each JobId, but the bsr may
  *  have multiple volumes, which have been entered in the
- *  order they were written.
+ *  order they were written.  
  * The bsrs must be written out in the order the JobIds
  *  are found in the jobid list.
  */
@@ -551,7 +555,7 @@ void add_findex_all(RBSR *bsr, uint32_t JobId)
          nbsr->next->JobId = JobId;
 
          /* If we use regexp to restore, set it for each jobid */
-         if (bsr->fileregex) {
+         if (bsr->fileregex) { 
             nbsr->next->fileregex = bstrdup(bsr->fileregex);
          }