0.99
[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 "nls.h"
13
14 extern int getfd(void);
15
16 int
17 main(int argc, char *argv[]) {
18         struct unimapinit advice;
19         int fd;
20
21         setlocale(LC_ALL, "");
22         bindtextdomain(PACKAGE, LOCALEDIR);
23         textdomain(PACKAGE);
24
25         fd = getfd();
26
27         advice.advised_hashsize = 0;
28         advice.advised_hashstep = 0;
29         advice.advised_hashlevel = 0;
30
31         if(ioctl(fd, PIO_UNIMAPCLR, &advice)) {
32                 perror("PIO_UNIMAPCLR");
33                 exit(1);
34         }
35 }