_exit(EXIT_FAILURE);
}
- return wait_for_terminate_and_check(KBD_SETFONT, pid, WAIT_LOG);
+ /* setfont returns EX_OSERR when ioctl(KDFONTOP/PIO_FONTX/PIO_FONTX) fails. This might mean various
+ * things, but in particular lack of a graphical console. Let's be generous and not treat this as an
+ * error. */
+ r = wait_for_terminate_and_check(KBD_SETFONT, pid, WAIT_LOG_ABNORMAL);
+ if (r == EX_OSERR)
+ log_notice(KBD_SETFONT " failed with a \"system error\" (EX_OSERR), ignoring.");
+ else if (r >= 0 && r != EXIT_SUCCESS)
+ log_error(KBD_SETFONT " failed with exit status %i.", r);
+
+ return r;
}
/*
if (idx > 0) {
if (r == 0)
setup_remaining_vcs(fd, idx, utf8);
- else if (r == EX_OSERR)
- /* setfont returns EX_OSERR when ioctl(KDFONTOP/PIO_FONTX/PIO_FONTX) fails.
- * This might mean various things, but in particular lack of a graphical
- * console. Let's be generous and not treat this as an error. */
- log_notice("Setting fonts failed with a \"system error\", ignoring.");
else
- log_warning("Setting source virtual console failed, ignoring remaining ones");
+ log_full(r == EX_OSERR ? LOG_NOTICE : LOG_WARNING,
+ "Setting source virtual console failed, ignoring remaining ones.");
}
return IN_SET(r, 0, EX_OSERR) && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;