#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
-#include <string.h>
#include <fcntl.h>
-#include <ctype.h>
#include <stdbool.h>
-#include <stdarg.h>
#include <limits.h>
#include <sys/ioctl.h>
-#include <sys/wait.h>
#include <linux/tiocl.h>
#include <linux/kd.h>
#include <linux/vt.h>
#include "util.h"
#include "log.h"
-#include "macro.h"
#include "virt.h"
#include "fileio.h"
if (ioctl(fd, KDSKBMODE, K_XLATE) < 0)
r = -errno;
- if (loop_write(fd, "\033%@", 3, false) < 0)
- r = -errno;
+ k = loop_write(fd, "\033%@", 3, false);
+ if (k < 0)
+ r = k;
k = write_string_file("/sys/module/vt/parameters/default_utf8", "0");
if (k < 0)
r = -errno;
}
- if (loop_write(fd, "\033%G", 3, false) < 0)
- r = -errno;
+ k = loop_write(fd, "\033%G", 3, false);
+ if (k < 0)
+ r = k;
k = write_string_file("/sys/module/vt/parameters/default_utf8", "1");
if (k < 0)