mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-05 02:58:01 +02:00
ply-device-manager: Don't log an error when /sys/class/tty/console/active is empty
This is possible on some kernels that were built with CONFIG_NULL_TTY enabled, and were booted with console=ttynull /sys/class/tty/console/active is empty in this case, so the file being empty is not always an error worth logging
This commit is contained in:
parent
6976081d6a
commit
2dc6aa9e44
1 changed files with 3 additions and 1 deletions
|
|
@ -974,7 +974,9 @@ add_consoles_from_file (ply_device_manager_t *manager,
|
|||
contents_length = read (fd, contents, sizeof(contents) - 1);
|
||||
|
||||
if (contents_length <= 0) {
|
||||
ply_trace ("couldn't read it: %m");
|
||||
if (contents_length < 0)
|
||||
ply_trace ("couldn't read it: %m");
|
||||
|
||||
close (fd);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue