]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/btape.c
Update the Microsoft Visual Studio build to match the MinGW32 build.
[bacula/bacula] / bacula / src / stored / btape.c
index 21ea77ede6b9fbf6578b96278a30997d48fc8843..6fe9210bad5a81635c8974c9cb98a27caf72405d 100644 (file)
@@ -178,7 +178,8 @@ int main(int margc, char *margv[])
    bsnprintf(buf, sizeof(buf), "%" llu, x64);
    i = bsscanf(buf, "%llu", &y64);
    if (i != 1 || x64 != y64) {
-      Pmsg3(-1, _("64 bit printf/scanf problem. i=%d x64=%" llu " y64=%" llu "\n"), i, x64, y64);
+      Pmsg3(-1, _("64 bit printf/scanf problem. i=%d x64=%" llu " y64=%" llu "\n"), 
+            i, x64, y64);
       exit(1);
    }
 
@@ -372,7 +373,7 @@ static void labelcmd()
       }
    }
    dev->rewind(dcr);
-   write_new_volume_label_to_dev(dcr, cmd, "Default");
+   write_new_volume_label_to_dev(dcr, cmd, "Default", true /* label dvd now */);
    Pmsg1(-1, _("Wrote Volume label for volume \"%s\".\n"), cmd);
 }
 
@@ -2099,6 +2100,7 @@ static void do_unfill()
    file_index = 0;
    if (last_block) {
       free_block(last_block);
+      last_block = NULL;
    }
    last_block_num = last_block_num1;
    last_file = last_file1;
@@ -2571,7 +2573,7 @@ do_tape_cmds()
    unsigned int i;
    bool found;
 
-   while (get_cmd("*")) {
+   while (!quit && get_cmd("*")) {
       sm_check(__FILE__, __LINE__, false);
       found = false;
       parse_args(cmd, &args, &argc, argk, argv, MAX_CMD_ARGS);
@@ -2581,10 +2583,9 @@ do_tape_cmds()
             found = true;
             break;
          }
-      if (!found)
-         Pmsg1(0, _("%s is an illegal command\n"), cmd);
-      if (quit)
-         break;
+      if (!found) {
+         Pmsg1(0, _("\"%s\" is an illegal command\n"), cmd);
+      }
    }
 }
 
@@ -2602,7 +2603,7 @@ static void helpcmd()
 static void usage()
 {
    fprintf(stderr, _(
-"Copyright (C) 2000-2005 Kern Sibbald.\n"
+"Copyright (C) 2000-%s Kern Sibbald.\n"
 "\nVersion: %s (%s)\n\n"
 "Usage: btape <options> <device_name>\n"
 "       -b <file>   specify bootstrap file\n"
@@ -2612,7 +2613,7 @@ static void usage()
 "       -s          turn off signals\n"
 "       -v          be verbose\n"
 "       -?          print this message.\n"
-"\n"), VERSION, BDATE);
+"\n"), BYEAR, VERSION, BDATE);
 
 }