libseat: log error when failing to open socket v1 APPLIED

Isaac Freund: 1
 libseat: log error when failing to open socket

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~kennylevinsen/seatd-devel/patches/15212/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] libseat: log error when failing to open socket Export this patch

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.
 libseat/backend/seatd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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));
		return -1;