#include <stdbool.h>
#include <stdarg.h>
#include <limits.h>
-#include <locale.h>
-#include <langinfo.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
#include <linux/tiocl.h>
return ioctl(fd, TIOCLINUX, data) >= 0;
}
-static bool is_locale_utf8(void) {
- const char *set;
-
- if (!setlocale(LC_ALL, ""))
- return true;
-
- set = nl_langinfo(CODESET);
- if (!set)
- return true;
-
- return streq(set, "UTF-8");
-}
-
static int disable_utf8(int fd) {
int r = 0, k;
if (r < 0 && r != -ENOENT)
log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));
-#elif defined(TARGET_ARCH)
- r = parse_env_file("/etc/rc.conf", NEWLINE,
- "KEYMAP", &vc_keymap,
- "CONSOLEFONT", &vc_font,
- "CONSOLEMAP", &vc_font_map,
- NULL);
- if (r < 0 && r != -ENOENT)
- log_warning("Failed to read /etc/rc.conf: %s", strerror(-r));
-
-#elif defined(TARGET_FRUGALWARE)
- r = parse_env_file("/etc/sysconfig/keymap", NEWLINE,
- "keymap", &vc_keymap,
- NULL);
- if (r < 0 && r != -ENOENT)
- log_warning("Failed to read /etc/sysconfig/keymap: %s", strerror(-r));
-
- r = parse_env_file("/etc/sysconfig/font", NEWLINE,
- "font", &vc_font,
- NULL);
- if (r < 0 && r != -ENOENT)
- log_warning("Failed to read /etc/sysconfig/font: %s", strerror(-r));
-
#elif defined(TARGET_ALTLINUX)
r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE,
"KEYTABLE", &vc_keymap,