123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include "libbb.h"
- struct vt_stat {
- unsigned short v_active;
- unsigned short v_signal;
- unsigned short v_state;
- };
- enum { VT_GETSTATE = 0x5603 };
- int fgconsole_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int fgconsole_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
- {
- struct vt_stat vtstat;
- vtstat.v_active = 0;
- xioctl(get_console_fd_or_die(), VT_GETSTATE, &vtstat);
- printf("%d\n", vtstat.v_active);
- return EXIT_SUCCESS;
- }
|