mirror of
https://github.com/systemd/systemd.git
synced 2025-03-22 06:50:18 +03:00
vconsole-setup: rename toggle_utf8() → toggle_utf8_vc()
Let's make clearer that toggle_utf8_sysfs() is about sysfs, and toggle_utf8_vc() about VC access
This commit is contained in:
parent
26382cab1b
commit
e8d1d6e76b
@ -87,11 +87,12 @@ static int verify_vc_kbmode(int fd) {
|
||||
return IN_SET(curr_mode, K_XLATE, K_UNICODE) ? 0 : -EBUSY;
|
||||
}
|
||||
|
||||
static int toggle_utf8(const char *name, int fd, bool utf8) {
|
||||
static int toggle_utf8_vc(const char *name, int fd, bool utf8) {
|
||||
int r;
|
||||
struct termios tc = {};
|
||||
|
||||
assert(name);
|
||||
assert(fd >= 0);
|
||||
|
||||
r = ioctl(fd, KDSKBMODE, utf8 ? K_UNICODE : K_XLATE);
|
||||
if (r < 0)
|
||||
@ -293,7 +294,7 @@ static void setup_remaining_vcs(int src_fd, unsigned src_idx, bool utf8) {
|
||||
if (verify_vc_kbmode(fd_d) < 0)
|
||||
continue;
|
||||
|
||||
toggle_utf8(ttyname, fd_d, utf8);
|
||||
(void) toggle_utf8_vc(ttyname, fd_d, utf8);
|
||||
|
||||
if (cfo.op != KD_FONT_OP_SET)
|
||||
continue;
|
||||
@ -458,7 +459,7 @@ int main(int argc, char **argv) {
|
||||
log_warning_errno(r, "Failed to read /proc/cmdline: %m");
|
||||
|
||||
(void) toggle_utf8_sysfs(utf8);
|
||||
(void) toggle_utf8(vc, fd, utf8);
|
||||
(void) toggle_utf8_vc(vc, fd, utf8);
|
||||
|
||||
r = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap);
|
||||
keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8) == 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user