}
static int vt_reset_keyboard(int fd) {
- int kb;
+ int r, kb;
- /* If we can't read the default, then default to unicode. It's 2017 after all. */
- kb = vt_default_utf8() != 0 ? K_UNICODE : K_XLATE;
+ assert(fd >= 0);
+ /* If we can't read the default, then default to Unicode. It's 2024 after all. */
+ r = vt_default_utf8();
+ if (r < 0)
+ log_debug_errno(r, "Failed to determine kernel VT UTF-8 mode, assuming enabled: %m");
+
+ kb = vt_default_utf8() != 0 ? K_UNICODE : K_XLATE;
return RET_NERRNO(ioctl(fd, KDSKBMODE, kb));
}