From abb56152ffceb8af8e9b288df0358ac6b7cd5f5d Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sun, 24 Jan 2021 17:50:45 -0500 Subject: [PATCH] xwayland: use wlr_log_errno instead of %m Previously, any error would be masked by an internal isatty call: 24:31:48.174 [DEBUG] [wlr] [xwayland/selection/incoming.c:386] XCB_SELECTION_NOTIFY (selection=277, property=278, target=256) 24:31:48.174 [ERROR] [wlr] [xwayland/selection/incoming.c:30] write error to target fd: Inappropriate ioctl for device --- xwayland/selection/incoming.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c index ceca1190..7e2a0c14 100644 --- a/xwayland/selection/incoming.c +++ b/xwayland/selection/incoming.c @@ -24,10 +24,10 @@ static int xwm_data_source_write(int fd, uint32_t mask, void *data) { ssize_t len = write(fd, property + transfer->property_start, remainder); if (len == -1) { + wlr_log_errno(WLR_ERROR, "write error to target fd %d", fd); xwm_selection_transfer_destroy_property_reply(transfer); xwm_selection_transfer_remove_source(transfer); xwm_selection_transfer_close_source_fd(transfer); - wlr_log(WLR_ERROR, "write error to target fd: %m"); return 1; }