X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fbscan.c;h=265a6201d5c1907f2333dd32c9d46fd73918c50f;hb=ce462cd94d90f4785b622cedc2ca48d616fe3f07;hp=fde0ba1ff06a960b1e9203d3e768e0a55c11207a;hpb=d79beac0ce55ca90df466315fc30e00b1bc99897;p=bacula%2Fbacula diff --git a/bacula/src/stored/bscan.c b/bacula/src/stored/bscan.c index fde0ba1ff0..265a6201d5 100644 --- a/bacula/src/stored/bscan.c +++ b/bacula/src/stored/bscan.c @@ -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;