1.01wip
[platform/upstream/kbd.git] / src / clrunimap.c
1 /*
2  * clrunimap.c
3  *
4  * Note: nowadays this kills kernel console output!
5  */
6
7 #include <stdio.h>
8 #include <stdlib.h>
9 #include <fcntl.h>
10 #include <linux/kd.h>
11 #include <sys/ioctl.h>
12 #include "getfd.h"
13 #include "nls.h"
14
15 int
16 main(int argc, char *argv[]) {
17         struct unimapinit advice;
18         int fd;
19
20         setlocale(LC_ALL, "");
21         bindtextdomain(PACKAGE, LOCALEDIR);
22         textdomain(PACKAGE);
23
24         fd = getfd();
25
26         advice.advised_hashsize = 0;
27         advice.advised_hashstep = 0;
28         advice.advised_hashlevel = 0;
29
30         if(ioctl(fd, PIO_UNIMAPCLR, &advice)) {
31                 perror("PIO_UNIMAPCLR");
32                 exit(1);
33         }
34
35         return 0;
36 }