[PATCH weston v2 1/5] libweston: Properly namespace backends entrypoint

Quentin Glidic sardemff7+wayland at sardemff7.net
Sun Dec 18 13:26:30 UTC 2016


From: Quentin Glidic <sardemff7+git at sardemff7.net>

This prevents loading a backend as a simple module. This will avoid
messing up with backends when we will introduce libweston common
modules.

Signed-off-by: Quentin Glidic <sardemff7+git at sardemff7.net>
---
 libweston/compositor-drm.c      | 4 ++--
 libweston/compositor-fbdev.c    | 4 ++--
 libweston/compositor-headless.c | 4 ++--
 libweston/compositor-rdp.c      | 4 ++--
 libweston/compositor-wayland.c  | 4 ++--
 libweston/compositor-x11.c      | 4 ++--
 libweston/compositor.c          | 2 +-
 libweston/compositor.h          | 4 ++--
 8 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 70514ea..529662f 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3300,8 +3300,8 @@ config_init_to_defaults(struct weston_drm_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor,
-	     struct weston_backend_config *config_base)
+weston_backend_init(struct weston_compositor *compositor,
+		    struct weston_backend_config *config_base)
 {
 	struct drm_backend *b;
 	struct weston_drm_backend_config config = {{ 0, }};
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index 0c45e98..44f0cf5 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -782,8 +782,8 @@ config_init_to_defaults(struct weston_fbdev_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor,
-	     struct weston_backend_config *config_base)
+weston_backend_init(struct weston_compositor *compositor,
+		    struct weston_backend_config *config_base)
 {
 	struct fbdev_backend *b;
 	struct weston_fbdev_backend_config config = {{ 0, }};
diff --git a/libweston/compositor-headless.c b/libweston/compositor-headless.c
index e7fc397..a1aec6d 100644
--- a/libweston/compositor-headless.c
+++ b/libweston/compositor-headless.c
@@ -316,8 +316,8 @@ config_init_to_defaults(struct weston_headless_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor,
-	     struct weston_backend_config *config_base)
+weston_backend_init(struct weston_compositor *compositor,
+		    struct weston_backend_config *config_base)
 {
 	struct headless_backend *b;
 	struct weston_headless_backend_config config = {{ 0, }};
diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c
index 223382c..4674612 100644
--- a/libweston/compositor-rdp.c
+++ b/libweston/compositor-rdp.c
@@ -1370,8 +1370,8 @@ config_init_to_defaults(struct weston_rdp_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor,
-	     struct weston_backend_config *config_base)
+weston_backend_init(struct weston_compositor *compositor,
+		    struct weston_backend_config *config_base)
 {
 	struct rdp_backend *b;
 	struct weston_rdp_backend_config config = {{ 0, }};
diff --git a/libweston/compositor-wayland.c b/libweston/compositor-wayland.c
index d1e387d..b53b170 100644
--- a/libweston/compositor-wayland.c
+++ b/libweston/compositor-wayland.c
@@ -2557,8 +2557,8 @@ config_init_to_defaults(struct weston_wayland_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor,
-	     struct weston_backend_config *config_base)
+weston_backend_init(struct weston_compositor *compositor,
+		    struct weston_backend_config *config_base)
 {
 	struct wayland_backend *b;
 	struct wayland_parent_output *poutput;
diff --git a/libweston/compositor-x11.c b/libweston/compositor-x11.c
index 34ef854..92033be 100644
--- a/libweston/compositor-x11.c
+++ b/libweston/compositor-x11.c
@@ -1761,8 +1761,8 @@ config_init_to_defaults(struct weston_x11_backend_config *config)
 }
 
 WL_EXPORT int
-backend_init(struct weston_compositor *compositor,
-	     struct weston_backend_config *config_base)
+weston_backend_init(struct weston_compositor *compositor,
+		    struct weston_backend_config *config_base)
 {
 	struct x11_backend *b;
 	struct weston_x11_backend_config config = {{ 0, }};
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 508c2a9..6226810 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -5347,7 +5347,7 @@ weston_compositor_load_backend(struct weston_compositor *compositor,
 	if (backend >= ARRAY_LENGTH(backend_map))
 		return -1;
 
-	backend_init = weston_load_module(backend_map[backend], "backend_init");
+	backend_init = weston_load_module(backend_map[backend], "weston_backend_init");
 	if (!backend_init)
 		return -1;
 
diff --git a/libweston/compositor.h b/libweston/compositor.h
index ce3d9ab..faeea3a 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -1751,8 +1751,8 @@ int
 weston_input_init(struct weston_compositor *compositor);
 
 int
-backend_init(struct weston_compositor *c,
-	     struct weston_backend_config *config_base);
+weston_backend_init(struct weston_compositor *c,
+		    struct weston_backend_config *config_base);
 int
 module_init(struct weston_compositor *compositor,
 	    int *argc, char *argv[]);
-- 
2.10.0



More information about the wayland-devel mailing list