From a093502891568ea30bb96572307527fb04e37ace Mon Sep 17 00:00:00 2001 From: "Bryce W. Harrington" Date: Fri, 21 Mar 2014 05:54:02 +0000 Subject: [PATCH] compositor: Use weston_log rather than perror for error messages weston_log() seems to be the standard elsewhere in the codebase for errors. These are the only two instances where perror() is used instead, and their error messages aren't that informative anyway. Signed-off-by: Bryce Harrington --- src/compositor-wayland.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c index 7d9e01b0..796f6a0c 100644 --- a/src/compositor-wayland.c +++ b/src/compositor-wayland.c @@ -211,13 +211,13 @@ wayland_output_get_shm_buffer(struct wayland_output *output) fd = os_create_anonymous_file(height * stride); if (fd < 0) { - perror("os_create_anonymous_file"); + weston_log("could not create an anonymous file buffer: %m\n"); return NULL; } data = mmap(NULL, height * stride, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (data == MAP_FAILED) { - perror("mmap"); + weston_log("could not mmap %d memory for data: %m\n", height * stride); close(fd); return NULL; }