]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/bls.c
Apply patch from Richard Mortimer to ensure that the number
[bacula/bacula] / bacula / src / stored / bls.c
index 933af258c2772320d437c252cc1924beff89bd2f..5d671f232d0eabe8e4ad24e6fef85508964ba636 100644 (file)
 #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; }
 
@@ -65,7 +59,7 @@ static BSR *bsr = NULL;
 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"
@@ -80,7 +74,7 @@ static void usage()
 "       -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);
 }
 
@@ -102,6 +96,8 @@ int main (int argc, char *argv[])
    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) {
@@ -124,7 +120,7 @@ int main (int argc, char *argv[])
          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);
@@ -138,7 +134,7 @@ int main (int argc, char *argv[])
          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);