]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/btape.c
Clean up some SD message nos.
[bacula/bacula] / bacula / src / stored / btape.c
index ecb16f2506375385f5dad5fd561fd5214b94d015..c3e961b445b9781121f290a9cf5de529545ad2f5 100644 (file)
@@ -82,7 +82,6 @@ static uint64_t VolBytes;
 static time_t now;
 static double kbs;
 static long file_index;
-static int verbose = 0;
 static int end_of_tape = 0;
 static uint32_t LastBlock = 0;
 static uint32_t eot_block;
@@ -646,13 +645,7 @@ static int re_read_block_test()
    }
    for (int i=0; i<len; i++) {
       if (rec->data[i] != 3) {
-         Pmsg0(0, _("Bad data in record. Test failed!\n"
-                    "This is not terribly serious since Bacula only uses\n"
-                    "This function to verify the last block written to the\n"
-                    "tape. Bacula will skip the last block verification\n"
-                    "if you add:\n\n"
-               "Backward Space Record = No\n\n"
-               "to your Storage daemon's Device resource definition.\n"));
+         Pmsg0(0, _("Bad data in record. Test failed!\n"));
         goto bail_out;
       }
    }
@@ -664,6 +657,14 @@ static int re_read_block_test()
 bail_out:
    free_block(block);
    free_record(rec);
+   if (stat == 0) {
+      Pmsg0(0, _("This is not terribly serious since Bacula only uses\n"
+                 "this function to verify the last block written to the\n"
+                 "tape. Bacula will skip the last block verification\n"
+                 "if you add:\n\n"
+                  "Backward Space Record = No\n\n"
+                  "to your Storage daemon's Device resource definition.\n"));
+   }   
    return stat;
 }
 
@@ -725,7 +726,6 @@ static int append_test()
 static void testcmd()
 {
    int stat;
-   re_read_block_test();
 
    stat = append_test();
    if (stat == 1) {                  /* OK get out */
@@ -795,6 +795,10 @@ all_done:
                "or Bacula will not be able to write multiple Jobs to \n"
                "the tape.\n\n"));
 
+   if (stat == 1) {
+      re_read_block_test();
+   }
+
    Pmsg0(-1, _("\n=== End Append files test ===\n"));
    
 }
@@ -1153,7 +1157,7 @@ This may take a long time. I.e. hours! ...\n\n");
     */
    jcr->VolFirstFile = 0;
    time(&jcr->run_time);             /* start counting time for rates */
-   for (file_index = 0; ok && !job_cancelled(jcr); ) {
+   for (file_index = 0; ok && !job_canceled(jcr); ) {
       uint64_t *lp;
       rec.VolSessionId = jcr->VolSessionId;
       rec.VolSessionTime = jcr->VolSessionTime;
@@ -1219,7 +1223,7 @@ This may take a long time. I.e. hours! ...\n\n");
    if (stop > 0) {
       Dmsg0(000, "Write_end_session_label()\n");
       /* Create Job status for end of session label */
-      if (!job_cancelled(jcr) && ok) {
+      if (!job_canceled(jcr) && ok) {
         set_jcr_job_status(jcr, JS_Terminated);
       } else if (!ok) {
         set_jcr_job_status(jcr, JS_ErrorTerminated);