mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
vconsole-setup: remember the correct error value when open_terminal() fails
This commit is contained in:
parent
58161db61b
commit
0d29fd46d1
|
@ -537,22 +537,19 @@ static int find_source_vc(char **ret_path, unsigned *ret_idx) {
|
|||
|
||||
fd = open_terminal(path, O_RDWR|O_CLOEXEC|O_NOCTTY);
|
||||
if (fd < 0) {
|
||||
log_debug_errno(fd, "Failed to open terminal %s, ignoring: %m", path);
|
||||
RET_GATHER(err, r);
|
||||
RET_GATHER(err, log_debug_errno(fd, "Failed to open terminal %s, ignoring: %m", path));
|
||||
continue;
|
||||
}
|
||||
|
||||
r = verify_vc_kbmode(fd);
|
||||
if (r < 0) {
|
||||
log_debug_errno(r, "Failed to check VC %s keyboard mode: %m", path);
|
||||
RET_GATHER(err, r);
|
||||
RET_GATHER(err, log_debug_errno(r, "Failed to check VC %s keyboard mode: %m", path));
|
||||
continue;
|
||||
}
|
||||
|
||||
r = verify_vc_display_mode(fd);
|
||||
if (r < 0) {
|
||||
log_debug_errno(r, "Failed to check VC %s display mode: %m", path);
|
||||
RET_GATHER(err, r);
|
||||
RET_GATHER(err, log_debug_errno(r, "Failed to check VC %s display mode: %m", path));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue