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) {
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;
if (dcr->VolumeName[0] == 0) {
return dir_ask_sysop_to_create_appendable_volume(dcr);
}
- dev->close();
Pmsg1(-1, "%s", dev->errmsg); /* print reason */
if (dcr->VolumeName[0] == 0 || strcmp(dcr->VolumeName, "TestVolume2") == 0) {
fprintf(stderr, _("Mount second Volume on device %s and press return when ready: "),
fprintf(stderr, _("Mount Volume \"%s\" on device %s and press return when ready: "),
dcr->VolumeName, dev->print_name());
}
+ dev->close();
getchar();
return true;
}
}
autochanger = autoload_device(dcr, 1, NULL);
if (!autochanger) {
- dev->close();
fprintf(stderr, _("Mount blank Volume on device %s and press return when ready: "),
dev->print_name());
+ dev->close();
getchar();
}
open_device(dcr);