]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/bscan.c
kes Fix mtx-changer to detect both versions of Ubuntu (Debian)
[bacula/bacula] / bacula / src / stored / bscan.c
index fde0ba1ff06a960b1e9203d3e768e0a55c11207a..265a6201d5c1907f2333dd32c9d46fd73918c50f 100644 (file)
@@ -44,6 +44,7 @@
  
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
+extern bool parse_sd_config(CONFIG *config, const char *configfile, int exit_code);
 
 /* Forward referenced functions */
 static void do_scan(void);
@@ -102,6 +103,7 @@ static int num_pools = 0;
 static int num_media = 0;
 static int num_files = 0;
 
+static CONFIG *config;
 #define CONFIG_FILE "bacula-sd.conf"
 char *configfile = NULL;
 STORES *me = NULL;                    /* our Global resource */
@@ -251,7 +253,8 @@ int main (int argc, char *argv[])
       configfile = bstrdup(CONFIG_FILE);
    }
 
-   parse_config(configfile);
+   config = new_config_parser();
+   parse_sd_config(config, configfile, M_ERROR_TERM);
    LockRes();
    me = (STORES *)GetNextRes(R_STORAGE, NULL);
    if (!me) {
@@ -290,7 +293,7 @@ int main (int argc, char *argv[])
       struct stat sb;
       fstat(dev->fd(), &sb);
       currentVolumeSize = sb.st_size;
-      Pmsg1(000, _("First Volume Size = %sn"), 
+      Pmsg1(000, _("First Volume Size = %s\n"), 
          edit_uint64(currentVolumeSize, ed1));
    }
 
@@ -364,7 +367,7 @@ static bool bscan_mount_next_read_volume(DCR *dcr)
       struct stat sb;
       fstat(dev->fd(), &sb);
       currentVolumeSize = sb.st_size;
-      Pmsg1(000, _("First Volume Size = %sn"), 
+      Pmsg1(000, _("First Volume Size = %s\n"), 
          edit_uint64(currentVolumeSize, ed1));
    }
    return stat;