#include "stored.h"
#include "findlib/find.h"
-#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
-int win32_client = 1;
-#else
-int win32_client = 0;
-#endif
-
/* Dummy functions */
int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
static bool list_blocks = false;
static bool list_jobs = false;
static DEV_RECORD *rec;
-static DEV_BLOCK *block;
static JCR *jcr;
static SESSION_LABEL sessrec;
static uint32_t num_files = 0;
static void usage()
{
fprintf(stderr, _(
-"Copyright (C) 2000-2005 Kern Sibbald.\n"
+"Copyright (C) 2000-%s Kern Sibbald.\n"
"\nVersion: %s (%s)\n\n"
"Usage: bls [options] <device-name>\n"
" -b <file> specify a bootstrap file\n"
" -p proceed inspite of errors\n"
" -v be verbose\n"
" -V specify Volume names (separated by |)\n"
-" -? print this message\n\n"), VERSION, BDATE);
+" -? print this message\n\n"), BYEAR, VERSION, BDATE);
exit(1);
}
my_name_is(argc, argv, "bls");
init_msg(NULL, NULL); /* initialize message handler */
+ OSDependentInit();
+
ff = init_find_files();
while ((ch = getopt(argc, argv, "b:c:d:e:i:jkLpvV:?")) != -1) {
break;
case 'e': /* exclude list */
- if ((fd = fopen(optarg, "r")) == NULL) {
+ if ((fd = fopen(optarg, "rb")) == NULL) {
Pmsg2(0, _("Could not open exclude file: %s, ERR=%s\n"),
optarg, strerror(errno));
exit(1);
break;
case 'i': /* include list */
- if ((fd = fopen(optarg, "r")) == NULL) {
+ if ((fd = fopen(optarg, "rb")) == NULL) {
Pmsg2(0, _("Could not open include file: %s, ERR=%s\n"),
optarg, strerror(errno));
exit(1);
}
dcr = jcr->dcr;
rec = new_record();
- block = new_block(dev);
attr = new_attr();
/*
* Assume that we have already read the volume label.
release_device(jcr->dcr);
free_attr(attr);
free_record(rec);
- free_block(block);
free_jcr(jcr);
- term_dev(dev);
+ dev->term();
}
/* List just block information */
static void do_blocks(char *infname)
{
+ DEV_BLOCK *block = dcr->block;
char buf1[100], buf2[100];
for ( ;; ) {
if (!read_block_from_device(dcr, NO_BLOCK_NUMBER_CHECK)) {
free_record(record);
Jmsg(jcr, M_INFO, 0, _("Mounted Volume \"%s\".\n"), dcr->VolumeName);
} else if (dev->at_eof()) {
- Jmsg(jcr, M_INFO, 0, _("Got EOF at file %u on device %s, Volume \"%s\"\n"),
+ Jmsg(jcr, M_INFO, 0, _("End of file %u on device %s, Volume \"%s\"\n"),
dev->file, dev->print_name(), dcr->VolumeName);
Dmsg0(20, "read_record got eof. try again\n");
continue;
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)