From 1d2026af2544b2f8ef077631c75d6898b8781646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 2 Dec 2024 20:57:11 +0100 Subject: [PATCH] Fix logging in xf86-input-mfndev Use X's logging function instead of plain perror, to ensure the message is written in appropriate Xorg's log. --- xf86-input-mfndev/src/qubes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xf86-input-mfndev/src/qubes.c b/xf86-input-mfndev/src/qubes.c index 04b7beff..9323c498 100644 --- a/xf86-input-mfndev/src/qubes.c +++ b/xf86-input-mfndev/src/qubes.c @@ -390,7 +390,7 @@ int connect_unix_socket(QubesDevicePtr pQubes) struct sockaddr_un remote; if ((s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { - perror("socket"); + xf86Msg(X_ERROR, "socket(%s): %s\n", pQubes->device, strerror(errno)); return -1; } @@ -399,7 +399,7 @@ int connect_unix_socket(QubesDevicePtr pQubes) strncpy(remote.sun_path, pQubes->device, sizeof(remote.sun_path)); len = strlen(remote.sun_path) + sizeof(remote.sun_family); if (connect(s, (struct sockaddr *) &remote, len) == -1) { - perror("connect"); + xf86Msg(X_ERROR, "connect(%s): %s\n", pQubes->device, strerror(errno)); close(s); return -1; }