[PATCH weston 2/4] shared: remove weston_config_get_libexec_dir()

Pekka Paalanen ppaalanen at gmail.com
Mon Jun 18 14:40:25 UTC 2018


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Now that WESTON_MODULE_MAP supersedes WESTON_BUILD_DIR for libexec
binaries, we don't need to check in WESTON_BUILD_DIR anymore.

There was only one user of weston_config_get_libexec_dir(), so remove
the whole function. There is no reason to export it.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 compositor/main.c      |  3 +--
 shared/config-parser.c | 12 ------------
 shared/config-parser.h |  2 --
 3 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/compositor/main.c b/compositor/main.c
index a801be87..2cb50c19 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -738,8 +738,7 @@ wet_get_binary_path(const char *name)
 	if (len > 0)
 		return strdup(path);
 
-	len = snprintf(path, sizeof path, "%s/%s",
-		       weston_config_get_libexec_dir(), name);
+	len = snprintf(path, sizeof path, "%s/%s", LIBEXECDIR, name);
 	if (len >= sizeof path)
 		return NULL;
 
diff --git a/shared/config-parser.c b/shared/config-parser.c
index 2a595b1f..ae5f8035 100644
--- a/shared/config-parser.c
+++ b/shared/config-parser.c
@@ -330,18 +330,6 @@ weston_config_section_get_bool(struct weston_config_section *section,
 	return 0;
 }
 
-WL_EXPORT
-const char *
-weston_config_get_libexec_dir(void)
-{
-	const char *path = getenv("WESTON_BUILD_DIR");
-
-	if (path)
-		return path;
-
-	return LIBEXECDIR;
-}
-
 const char *
 weston_config_get_name_from_env(void)
 {
diff --git a/shared/config-parser.h b/shared/config-parser.h
index af3f66a2..5cb0bca1 100644
--- a/shared/config-parser.h
+++ b/shared/config-parser.h
@@ -103,8 +103,6 @@ int
 weston_config_section_get_bool(struct weston_config_section *section,
 			       const char *key,
 			       int *value, int default_value);
-const char *
-weston_config_get_libexec_dir(void);
 
 const char *
 weston_config_get_name_from_env(void);
-- 
2.16.4



More information about the wayland-devel mailing list