config-parser: Make weston_config_parse() tkae a file name

Take a basename of the config file to parse instead of an fd.
This commit is contained in:
Kristian Høgsberg
2013-09-21 23:02:31 -07:00
parent 81c2c2eb5e
commit 1abe0486bb
8 changed files with 22 additions and 36 deletions
+2 -5
View File
@@ -3418,7 +3418,7 @@ int main(int argc, char *argv[])
*(*backend_init)(struct wl_display *display,
int *argc, char *argv[],
struct weston_config *config);
int i, config_fd;
int i;
char *backend = NULL;
char *shell = NULL;
char *modules, *option_modules = NULL;
@@ -3486,10 +3486,7 @@ int main(int argc, char *argv[])
backend = WESTON_NATIVE_BACKEND;
}
config_fd = open_config_file("weston.ini");
config = weston_config_parse(config_fd);
close(config_fd);
config = weston_config_parse("weston.ini");
section = weston_config_get_section(config, "core", NULL, NULL);
weston_config_section_get_string(section, "modules", &modules, "");