core: remove reference to a non-existing field of the theme struct
[fbsplash.git] / misc / kbd / fgconsole.c
blobf31289b1796d02580c0872bd23d0266f2f6b3858
1 /*
2 * fgconsole.c - aeb - 960123 - Print foreground console
3 */
4 #include <stdio.h>
5 #include <stdlib.h>
6 #include <sys/ioctl.h>
7 #include <linux/vt.h>
8 #include "getfd.h"
10 int
11 main(int argc, char **argv){
12 int fd;
13 struct vt_stat vtstat;
15 fd = getfd(NULL);
16 if (ioctl(fd, VT_GETSTATE, &vtstat)) {
17 perror("fgconsole: VT_GETSTATE");
18 exit(1);
20 printf("%d\n", vtstat.v_active);
21 return 0;