From: Lennart Poettering Date: Fri, 9 Feb 2024 11:54:03 +0000 (+0100) Subject: dev-setup: normalize logging around lock_dev_console() X-Git-Tag: v256-rc1~914^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0f6b6813554e5c72302d5337570787f9b85692b;p=thirdparty%2Fsystemd.git 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. --- 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); }