summaryrefslogtreecommitdiff
path: root/shared/config-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared/config-parser.c')
-rw-r--r--shared/config-parser.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/shared/config-parser.c b/shared/config-parser.c
index ff6814ce..8519eb68 100644
--- a/shared/config-parser.c
+++ b/shared/config-parser.c
@@ -294,6 +294,18 @@ weston_config_get_libexec_dir(void)
return LIBEXECDIR;
}
+const char *
+weston_config_get_name_from_env(void)
+{
+ const char *name;
+
+ name = getenv(WESTON_CONFIG_FILE_ENV_VAR);
+ if (name)
+ return name;
+
+ return "weston.ini";
+}
+
static struct weston_config_section *
config_add_section(struct weston_config *config, const char *name)
{