cfg_ovr = extract_commandline_config_overwrites(&argc, &argv);
- if (my_argc > 1 && strcmp(my_argv[1], "-t") == 0) {
+ if (argc > 1 && strcmp(argv[1], "-t") == 0) {
amtrmidx_debug = 1;
- my_argc--;
- my_argv++;
+ argc--;
+ argv++;
}
if (argc < 2) {
return 1;
}
- config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_FATAL | CONFIG_INIT_USE_CWD,
- argv[1]);
+ config_init(CONFIG_INIT_EXPLICIT_NAME | CONFIG_INIT_USE_CWD, argv[1]);
apply_config_overwrites(cfg_ovr);
- check_running_as(RUNNING_AS_DUMPUSER);
-
- dbrename(config_name, DBG_SUBDIR_SERVER);
-
conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
- if (read_diskfile(conf_diskfile, &diskl) < 0) {
- error(_("could not load disklist \"%s\""), conf_diskfile);
- /*NOTREACHED*/
- }
+ read_diskfile(conf_diskfile, &diskl);
amfree(conf_diskfile);
+ if (config_errors(NULL) >= CFGERR_WARNINGS) {
+ config_print_errors();
+ if (config_errors(NULL) >= CFGERR_ERRORS) {
+ g_critical(_("errors processing config file"));
+ }
+ }
+
+ check_running_as(RUNNING_AS_DUMPUSER);
+
+ dbrename(get_config_name(), DBG_SUBDIR_SERVER);
+
conf_tapelist = config_dir_relative(getconf_str(CNF_TAPELIST));
if(read_tapelist(conf_tapelist)) {
error(_("could not load tapelist \"%s\""), conf_tapelist);