mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
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.
This commit is contained in:
parent
ec3f432bbb
commit
ab80ad902e
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue