]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/btape.c
kes Apply Richard Mortimer's patches for printing an error
[bacula/bacula] / bacula / src / stored / btape.c
index 10b64c4377af7c6523fee5d45ce4bcc21902923d..43c00d64d9f991734b9379bfa392b5b73c6cb026 100644 (file)
@@ -152,6 +152,7 @@ int main(int margc, char *margv[])
    setlocale(LC_ALL, "");
    bindtextdomain("bacula", LOCALEDIR);
    textdomain("bacula");
+   init_stack_dump();
 
    /* Sanity checks */
    if (TAPE_BSIZE % B_DEV_BSIZE != 0 || TAPE_BSIZE / B_DEV_BSIZE == 0) {
@@ -269,6 +270,16 @@ int main(int margc, char *margv[])
    if (!dev) {
       exit(1);
    }
+   if (dev->is_dvd()) {
+      Pmsg0(000, _("btape does not work with DVD storage.\n"));
+      usage();
+      exit(1);
+   }
+   if (!dev->is_tape()) {
+      Pmsg0(000, _("btape only works with tape storage.\n"));
+      usage();
+      exit(1);
+   }
    dcr = jcr->dcr;
    if (!open_the_device()) {
       goto terminate;