uint32_t new_VolSessionId();
/* From acquire.c */
-bool reserve_device_for_append(JCR *jcr, DEVICE *dev);
-DCR *acquire_device_for_append(JCR *jcr, DEVICE *dev);
-bool reserve_device_for_read(JCR *jcr, DEVICE *dev);
-DCR *acquire_device_for_read(JCR *jcr, DEVICE *dev);
+bool reserve_device_for_append(DCR *dcr);
+DCR *acquire_device_for_append(DCR *dcr);
+bool reserve_device_for_read(DCR *dcr);
+DCR *acquire_device_for_read(DCR *dcr);
bool release_device(DCR *dcr);
DCR *new_dcr(JCR *jcr, DEVICE *dev);
void free_dcr(DCR *dcr);
int weof_dev(DEVICE *dev, int num);
int write_block(DEVICE *dev);
uint32_t status_dev(DEVICE *dev);
-int eod_dev(DEVICE *dev);
+bool eod_dev(DEVICE *dev);
bool fsf_dev(DEVICE *dev, int num);
bool fsr_dev(DEVICE *dev, int num);
bool bsf_dev(DEVICE *dev, int num);
bool dev_can_write(DEVICE *dev);
bool offline_or_rewind_dev(DEVICE *dev);
bool reposition_dev(DEVICE *dev, uint32_t file, uint32_t block);
-void init_dev_wait_timers(DEVICE *dev);
+void init_device_wait_timers(DCR *dcr);
bool double_dev_wait_time(DEVICE *dev);
/* Get info about device */
uint32_t dev_file(DEVICE *dev);
bool dev_is_tape(DEVICE *dev);
+/* From dvd.c */
+bool dvd_close_job(DCR *dcr);
+
+
/* From device.c */
bool open_device(DCR *dcr);
bool first_open_device(DEVICE *dev);
void create_session_label(DCR *dcr, DEV_RECORD *rec, int label);
void create_volume_label(DEVICE *dev, const char *VolName, const char *PoolName);
bool write_new_volume_label_to_dev(DCR *dcr, const char *VolName, const char *PoolName);
-bool write_ansi_ibm_label(DCR *dcr, const char *VolName);
+#define ANSI_VOL_LABEL 0
+#define ANSI_EOF_LABEL 1
+#define ANSI_EOV_LABEL 2
+bool write_ansi_ibm_labels(DCR *dcr, int type, const char *VolName);
int read_ansi_ibm_label(DCR *dcr);
bool write_session_label(DCR *dcr, int label);
bool write_volume_label_to_block(DCR *dcr);
bool commit_attribute_spool (JCR *jcr);
bool write_block_to_spool_file (DCR *dcr);
void list_spool_stats (BSOCK *bs);
+
+/* From wait.c */
+int wait_for_sysop(DCR *dcr);
+bool wait_for_device(DCR *dcr, const char *msg, bool first);