]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dev-setup: normalize logging around lock_dev_console()
authorLennart Poettering <lennart@poettering.net>
Fri, 9 Feb 2024 11:54:03 +0000 (12:54 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 9 Feb 2024 13:19:16 +0000 (14:19 +0100)
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

index 08fdd60570470a66c0b767a30ba3203b2c686e71..3592b0a6505ade49dcde4715f61d275a91769e07 100644 (file)
@@ -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);
 }