From a0f6b6813554e5c72302d5337570787f9b85692b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 9 Feb 2024 12:54:03 +0100 Subject: [PATCH] dev-setup: normalize logging around lock_dev_console() Previously this function would log loudly in some cases but not in others. Clean this up, and dont log at all, matching our coding style which says we should either log in all error cases or in none. Both callers of this function do logging already, hence no need to duplicate it here. --- src/shared/dev-setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/dev-setup.c b/src/shared/dev-setup.c index 08fdd605704..3592b0a6505 100644 --- a/src/shared/dev-setup.c +++ b/src/shared/dev-setup.c @@ -28,7 +28,7 @@ int lock_dev_console(void) { r = lock_generic(fd, LOCK_BSD, LOCK_EX); if (r < 0) - return log_error_errno(r, "Failed to lock /dev/console: %m"); + return r; return TAKE_FD(fd); } -- 2.47.3