summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2024-03-28 13:06:06 +0200
committerMarius Vlad <marius.vlad@collabora.com>2024-03-28 14:40:24 +0200
commit3514c203c2781bc02cc29c7a57ff30b2b4d9434c (patch)
tree6b948c5a4eb8987fc1f8465353e7bfa06ddfec3c
parentaa3e4ed07459535d27a5ef403e86d02cf91686c4 (diff)
compositor: Add more error messages
This prints out eariler when a backend failed to load. Bug-AGL: SPEC-5096, SPEC-5061 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I8d6d93fb1ed0f8bcc1fd1b1bf340d46c65b6291a
-rw-r--r--src/compositor.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/compositor.c b/src/compositor.c
index 3a4b628..cd36eeb 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1075,8 +1075,10 @@ load_drm_backend(struct ivi_compositor *ivi, int *argc, char *argv[],
&ivi->heads_changed);
if (!weston_compositor_load_backend(ivi->compositor, WESTON_BACKEND_DRM,
- &config.base))
+ &config.base)) {
+ weston_log("Failed to load DRM backend\n");
return -1;
+ }
ivi->drm_api = weston_drm_output_get_api(ivi->compositor);
if (!ivi->drm_api) {
@@ -1222,8 +1224,12 @@ load_wayland_backend(struct ivi_compositor *ivi, int *argc, char *argv[],
weston_compositor_add_heads_changed_listener(ivi->compositor,
&ivi->heads_changed);
- ivi->backend = weston_compositor_load_backend(ivi->compositor, WESTON_BACKEND_WAYLAND,
+ ivi->backend = weston_compositor_load_backend(ivi->compositor,
+ WESTON_BACKEND_WAYLAND,
&config.base);
+ if (!ivi->backend) {
+ weston_log("Failed to create Wayland backend!\n");
+ }
free(config.cursor_theme);
free(config.display_name);
@@ -1294,8 +1300,13 @@ load_x11_backend(struct ivi_compositor *ivi, int *argc, char *argv[],
weston_compositor_add_heads_changed_listener(ivi->compositor,
&ivi->heads_changed);
- if (!weston_compositor_load_backend(ivi->compositor, WESTON_BACKEND_X11, &config.base))
+ ivi->backend = weston_compositor_load_backend(ivi->compositor,
+ WESTON_BACKEND_X11,
+ &config.base);
+ if (!ivi->backend) {
+ weston_log("Failed to create X11 backend!\n");
return -1;
+ }
ivi->window_api = weston_windowed_output_get_api(ivi->compositor);
if (!ivi->window_api) {
@@ -1435,8 +1446,10 @@ load_rdp_backend(struct ivi_compositor *ivi, int *argc, char **argv)
&ivi->heads_changed);
if (!weston_compositor_load_backend(ivi->compositor,
- WESTON_BACKEND_RDP, &config.base))
+ WESTON_BACKEND_RDP, &config.base)) {
+ weston_log("Failed to create RDP backend\n");
return -1;
+ }
free(config.bind_address);
free(config.rdp_key);