diff options
author | Isaac Freund <ifreund@ifreund.xyz> | 2020-11-21 16:59:01 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-11-21 21:03:55 +0100 |
commit | 3c80a9db9628aec7009d7e51c1a3393bc801078c (patch) | |
tree | 690f2e13630bc1c08ba598de9fd68d12ac6b25fa /libseat | |
parent | 2185e8f180f30a87d1a1f76505d9133e27cda1d6 (diff) |
libseat: log error when failing to open socket
The most common pain point I've seen with people trying out seat is
forgetting to add themselves to whatever group the distro has chosen
to own the socket.
Logging this error and path of the socket should make it easier to tell
why things aren't working.
Diffstat (limited to 'libseat')
-rw-r--r-- | libseat/backend/seatd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libseat/backend/seatd.c b/libseat/backend/seatd.c index f728a33..e4ce7c4 100644 --- a/libseat/backend/seatd.c +++ b/libseat/backend/seatd.c @@ -75,7 +75,7 @@ static int seatd_connect(void) { strncpy(addr.unix.sun_path, path, sizeof addr.unix.sun_path - 1); socklen_t size = offsetof(struct sockaddr_un, sun_path) + strlen(addr.unix.sun_path); if (connect(fd, &addr.generic, size) == -1) { - log_debugf("Could not connect to socket: %s", strerror(errno)); + log_errorf("Could not connect to socket %s: %s", path, strerror(errno)); close(fd); return -1; }; |