- config_dir = vstralloc(CONFIG_DIR, "/", config_name, "/", NULL);
- conffile = stralloc2(config_dir, CONFFILE_NAME);
- if(read_conffile(conffile)) {
- error("errors processing config file \"%s\"", conffile);
- }
- amfree(conffile);
- conf_diskfile = getconf_str(CNF_DISKFILE);
- if (*conf_diskfile == '/') {
- conf_diskfile = stralloc(conf_diskfile);
- } else {
- conf_diskfile = stralloc2(config_dir, conf_diskfile);
- }
- if((diskl = read_diskfile(conf_diskfile)) == NULL) {
- error("could not load disklist %s", conf_diskfile);
- }
+ conf_diskfile = config_dir_relative(getconf_str(CNF_DISKFILE));
+ read_diskfile(conf_diskfile, &diskl);