Copyright (C) 2001-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as amended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
#include "stored.h"
#include "findlib/find.h"
#include "cats/cats.h"
+
+/* Dummy functions */
+int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
/* Forward referenced functions */
static void do_scan(void);
static int num_files = 0;
#define CONFIG_FILE "bacula-sd.conf"
-char *configfile;
+char *configfile = NULL;
STORES *me = NULL; /* our Global resource */
bool forge_on = false; /* proceed inspite of I/O errors */
pthread_mutex_t device_release_mutex = PTHREAD_MUTEX_INITIALIZER;
/* Check Media Info */
memset(&mr, 0, sizeof(mr));
- bstrncpy(mr.VolumeName, dev->VolHdr.VolName, sizeof(mr.VolumeName));
+ bstrncpy(mr.VolumeName, dev->VolHdr.VolumeName, sizeof(mr.VolumeName));
mr.PoolId = pr.PoolId;
num_media++;
if (db_get_media_record(bjcr, db, &mr)) {
update_db = save_update_db;
jr.PoolId = pr.PoolId;
+#ifdef xxx
/* Set start positions into JCR */
if (dev->is_tape()) {
/*
dcr->StartBlock = (uint32_t)dev->file_addr;
dcr->StartFile = (uint32_t)(dev->file_addr >> 32);
}
+#endif
mjcr->start_time = jr.StartTime;
mjcr->JobLevel = jr.JobLevel;
*/
static void bscan_free_jcr(JCR *jcr)
{
- Dmsg0(200, "Start dird free_jcr\n");
+ Dmsg0(200, "Start bscan free_jcr\n");
if (jcr->file_bsock) {
Dmsg0(200, "Close File bsock\n");
free_dcr(jcr->dcr);
jcr->dcr = NULL;
}
- Dmsg0(200, "End dird free_jcr\n");
+ Dmsg0(200, "End bscan free_jcr\n");
}
/*
bool dir_update_file_attributes(DCR *dcr, DEV_RECORD *rec) { return 1;}
bool dir_send_job_status(JCR *jcr) {return 1;}
int generate_job_event(JCR *jcr, const char *event) { return 1; }
-
+VOLRES *new_volume(DCR *dcr, const char *VolumeName) { return NULL; }
+bool free_volume(DEVICE *dev) { return true; }
+void free_unused_volume(DCR *dcr) { }
bool dir_ask_sysop_to_mount_volume(DCR *dcr)
{
if (dev_cap(dev, CAP_OFFLINEUNMOUNT)) {
offline_dev(dev);
}
- force_close_dev(dev);
+ force_close_device(dev);
fprintf(stderr, "Mount Volume \"%s\" on device %s and press return when ready: ",
dcr->VolumeName, dev->print_name());
getchar();