X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fprotos.h;h=6fee3a0e8aa1edd0675af68a0092d05742275366;hb=6fc016ea3c4f5698462494319733199e2de9a9af;hp=7afa0e8b97e007b3add8b32c88e2735fa781660f;hpb=19ec33747123174276b5dd8b0f5702c02e90465d;p=bacula%2Fbacula diff --git a/bacula/src/stored/protos.h b/bacula/src/stored/protos.h index 7afa0e8b97..6fee3a0e8a 100644 --- a/bacula/src/stored/protos.h +++ b/bacula/src/stored/protos.h @@ -28,11 +28,11 @@ 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 release_device(JCR *jcr); +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); @@ -49,6 +49,8 @@ bool dir_ask_sysop_to_mount_volume(DCR *dcr); bool dir_update_file_attributes(DCR *dcr, DEV_RECORD *rec); bool dir_send_job_status(JCR *jcr); bool dir_create_jobmedia_record(DCR *dcr); +bool dir_update_device(JCR *jcr, DEVICE *dev); +bool dir_update_changer(JCR *jcr, AUTOCHANGER *changer); /* authenticate.c */ int authenticate_director(JCR *jcr); @@ -56,8 +58,8 @@ int authenticate_filed(JCR *jcr); /* From autochanger.c */ int autoload_device(DCR *dcr, int writing, BSOCK *dir); -bool autochanger_list(DCR *dcr, BSOCK *dir); -void invalidate_slot_in_catalog(DCR *dcr); +bool autochanger_cmd(DCR *dcr, BSOCK *dir, const char *cmd); +void mark_volume_not_inchanger(DCR *dcr); char *edit_device_codes(DCR *dcr, char *omsg, const char *cmd); /* From block.c */ @@ -105,26 +107,26 @@ int flush_dev(DEVICE *dev); 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 bsr_dev(DEVICE *dev, int num); void attach_jcr_to_device(DEVICE *dev, JCR *jcr); void detach_jcr_from_device(DEVICE *dev, JCR *jcr); JCR *next_attached_jcr(DEVICE *dev, JCR *jcr); -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 */ -char * dev_name(DEVICE *dev); char * dev_vol_name(DEVICE *dev); uint32_t dev_block(DEVICE *dev); 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); @@ -162,7 +164,10 @@ int read_dev_volume_label_guess(DCR *dcr, bool write); 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); @@ -211,12 +216,16 @@ bool read_records(DCR *dcr, bool mount_cb(DCR *dcr)); /* From spool.c */ -bool begin_data_spool (JCR *jcr); -bool discard_data_spool (JCR *jcr); -bool commit_data_spool (JCR *jcr); +bool begin_data_spool (DCR *dcr); +bool discard_data_spool (DCR *dcr); +bool commit_data_spool (DCR *dcr); bool are_attributes_spooled (JCR *jcr); bool begin_attribute_spool (JCR *jcr); bool discard_attribute_spool (JCR *jcr); 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);