aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTudor Brindus <me@tbrindus.ca>2020-10-10 22:58:57 -0400
committerSimon Ser <contact@emersion.fr>2020-10-11 06:36:23 +0200
commitab80ad902e5914d8b7fbe08f155ac49917acbad0 (patch)
tree0f785fc4a37a89b95adf22a044995d1962831d9b
parentec3f432bbb4cbcb75adc695753353239e017a8bd (diff)
xwayland: using %m in `wlr_log` is broken, use `wlr_log_errno` instead
This one was awful to track down, but calls to `wlr_log` with %m have the errno masked by the `isatty` call in `log_stderr`. Switch them to `wlr_log_errno` instead. Cue quality "how can read(2) POSSIBLY be returning ENOTTY?" moments.
-rw-r--r--xwayland/selection/outgoing.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xwayland/selection/outgoing.c b/xwayland/selection/outgoing.c
index 002c0143..33aa225b 100644
--- a/xwayland/selection/outgoing.c
+++ b/xwayland/selection/outgoing.c
@@ -92,7 +92,7 @@ static int xwm_data_source_read(int fd, uint32_t mask, void *data) {
size_t available = transfer->source_data.alloc - current;
ssize_t len = read(fd, p, available);
if (len == -1) {
- wlr_log(WLR_ERROR, "read error from data source: %m");
+ wlr_log_errno(WLR_ERROR, "read error from data source");
goto error_out;
}
@@ -289,7 +289,7 @@ static void xwm_selection_send_data(struct wlr_xwm_selection *selection,
int p[2];
if (pipe(p) == -1) {
- wlr_log(WLR_ERROR, "pipe() failed: %m");
+ wlr_log_errno(WLR_ERROR, "pipe() failed");
xwm_selection_send_notify(selection->xwm, req, false);
return;
}