all: Makefile
@for I in ${all_subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; \
- $(MAKE) $@ || (echo ""; echo ""; echo -e " \a\a ====== Error in `pwd` ======\a\a"; \
+ $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
echo ""; echo "";)); \
done
bacula-fd: Makefile
@for I in ${fd_subdirs}; \
do (cd $$I; echo "==>Entering directory `pwd`"; \
- $(MAKE) all || (echo ""; echo ""; echo -e " \a\a ====== Error in `pwd` ======\a\a"; \
+ $(MAKE) all || (echo ""; echo ""; echo " ====== Error in `pwd` ======; \
echo ""; echo "";)); \
done
$(RMF) Makefile.bak; \
else \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong\n\a"; \
+ echo " ===== Something went wrong in make depend ====="; \
fi
# -----------------------------------------------------------------------
$(RMF) Makefile.bak; \
else \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong\n\a"; \
+ echo " ===== Something went wrong in make depend ====="; \
fi
# -----------------------------------------------------------------------
$(RMF) Makefile.bak; \
else \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong\n\a"; \
+ echo " ===== Something went wrong in make depend ====="; \
fi
# -----------------------------------------------------------------------
$(RMF) Makefile.bak; \
else \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong\n\a"; \
+ echo " ===== Something went wrong in make depend ====="; \
fi
# -----------------------------------------------------------------------
$(RMF) Makefile.bak; \
else \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong\n\a"; \
+ echo " ===== Something went wrong in make depend ====="; \
fi
# -----------------------------------------------------------------------
$(RMF) Makefile.bak; \
else \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong with make depend\n\a"; \
+ echo " ======= Something went wrong with make depend. ======="; \
fi
# -----------------------------------------------------------------------
Dmsg1(120, "bstored: open vol=%s\n", dcr->VolumeName);
if (open_dev(dev, dcr->VolumeName, OPEN_READ_ONLY) < 0) {
if (dev->dev_errno == EIO) { /* no tape loaded */
+ Jmsg3(jcr, M_WARNING, 0, _("Open device %s Volume \"%s\" failed: ERR=%s\n"),
+ dev->print_name(), dcr->VolumeName, strerror_dev(dev));
goto default_path;
}
break;
}
- Jmsg(jcr, M_FATAL, 0, _("Open device %s Volume \"%s\" failed: ERR=%s\n"),
+ Jmsg3(jcr, M_FATAL, 0, _("Open device %s Volume \"%s\" failed: ERR=%s\n"),
dev->print_name(), dcr->VolumeName, strerror_dev(dev));
goto get_out;
}
}
/* Fall through */
default:
- Jmsg(jcr, M_WARNING, 0, "%s", jcr->errmsg);
+ Jmsg1(jcr, M_WARNING, 0, "%s", jcr->errmsg);
default_path:
tape_previously_mounted = true;
if (dev->can_read()) {
dev->clear_read(); /* clear read bit */
- /* Close if file or !CAP_ALWAYSOPEN */
- if (!dev->is_tape() || !dev_cap(dev, CAP_ALWAYSOPEN)) {
- offline_or_rewind_dev(dev);
- close_dev(dev);
- }
+
/******FIXME**** send read volume usage statistics to director */
} else if (dev->num_writers > 0) {
Dmsg0(100, "==== write ansi eof label \n");
}
- /* If no writers, close if file or !CAP_ALWAYS_OPEN */
- if (dev->num_writers == 0 && (!dev->is_tape() || !dev_cap(dev, CAP_ALWAYSOPEN))) {
- offline_or_rewind_dev(dev);
- close_dev(dev);
- }
} else {
- Jmsg2(jcr, M_FATAL, 0, _("BAD ERROR: release_device %s, Volume \"%s\" not in use.\n"),
- dev->print_name(), NPRT(dcr->VolumeName));
- Jmsg2(jcr, M_ERROR, 0, _("num_writers=%d state=%x\n"), dev->num_writers, dev->state);
- ok = false;
+ /*
+ * If we reach here, it is most likely because the
+ * has failed, since the device is not in read mode and
+ * there are no writers.
+ */
+ }
+
+ /* If no writers, close if file or !CAP_ALWAYS_OPEN */
+ if (dev->num_writers == 0 && (!dev->is_tape() || !dev_cap(dev, CAP_ALWAYSOPEN))) {
+ offline_or_rewind_dev(dev);
+ close_dev(dev);
}
/* Fire off Alert command and include any output */
Dmsg0(90, "back from write_end_session_label()\n");
/* Flush out final partial block of this session */
if (!write_block_to_device(dcr)) {
+ Jmsg2(jcr, M_FATAL, 0, _("Fatal append error on device %s: ERR=%s\n"),
+ dev->print_name(), strerror_dev(dev));
Dmsg0(100, _("Set ok=FALSE after write_block_to_device.\n"));
- set_jcr_job_status(jcr, JS_ErrorTerminated);
ok = false;
}
}
loaded = get_autochanger_loaded_slot(dcr);
if (loaded > 0) {
bnet_fsend(dir,
- _("3305 Issuing autochanger \"unload slot %d, drive %d\" command.\n"),
+ _("3307 Issuing autochanger \"unload slot %d, drive %d\" command.\n"),
loaded, drive);
slot = dcr->VolCatInfo.Slot;
dcr->VolCatInfo.Slot = loaded;
break;
}
ok = write_block_to_device(dcr);
+ if (!ok) {
+ Jmsg2(jcr, M_FATAL, 0, _("Fatal append error on device %s: ERR=%s\n"),
+ dcr->dev->print_name(), strerror_dev(dcr->dev));
+ }
Dmsg3(800, "Write block ok=%d FI=%d LI=%d\n", ok, block->FirstIndex, block->LastIndex);
}
dcr->block = block; /* reset block */
$(RMF) Makefile.bak; \
else \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong\n\a"; \
+ echo " ===== Something went wrong in make depend ====="; \
fi
# -----------------------------------------------------------------------