Skip to content

Commit

Permalink
Fix logging in xf86-input-mfndev
Browse files Browse the repository at this point in the history
Use X's logging function instead of plain perror, to ensure the message
is written in appropriate Xorg's log.

(cherry picked from commit 1d2026a)
  • Loading branch information
marmarek committed Dec 27, 2024
1 parent 6fb0578 commit 6d0540e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xf86-input-mfndev/src/qubes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}
Expand Down

0 comments on commit 6d0540e

Please sign in to comment.