~kennylevinsen/seatd-devel

seatd: libseat/seatd: downgrade ENOENT log to info v1 APPLIED

Simon Ser: 1
 libseat/seatd: downgrade ENOENT log to info

 1 files changed, 5 insertions(+), 1 deletions(-)
build pending: smoketest-seatd.sh
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/22246/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH seatd] libseat/seatd: downgrade ENOENT log to info Export this patch

The socket is expected not to be found if seatd is not running.
In general other backends will be attempted after seatd. There is
already an error message in case no backend can be started.
---
 libseat/backend/seatd.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libseat/backend/seatd.c b/libseat/backend/seatd.c
index 2dea3ca62501..07026ba0193e 100644
--- a/libseat/backend/seatd.c
+++ b/libseat/backend/seatd.c
@@ -75,7 +75,11 @@ 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_errorf("Could not connect to socket %s: %s", path, strerror(errno));
		if (errno == ENOENT) {
			log_infof("Could not connect to socket %s: %s", path, strerror(errno));
		} else {
			log_errorf("Could not connect to socket %s: %s", path, strerror(errno));
		}
		close(fd);
		return -1;
	};
-- 
2.31.1
Applied, thanks!