Date: Wed, 18 Feb 1998 19:33:01 +1030 From: "Daniel J. O'Connor" <darius@holly.dons.net.au> To: multimedia@FreeBSD.ORG Subject: VT mangulations.. Message-ID: <199802180903.TAA06360@holly.dons.net.au>
next in thread | raw e-mail | index | archive | help
Hi,
I have written a program which makes a VT useable after quake has
mangled it..
Its really useful when you are testing out new things :)
(Of course you still need another machine to run it from, but you ca
write a wrapper script to call it when quake exists.. - oh another
point - don't run it when quake is, then quake will not be able to
understand any keyboard events, you can fix it by doing ALT-F2,
logging in(blind) then killing quake :)
--- CUT HERE ---
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/errno.h>
#include <machine/console.h>
void main(void) {
int sfd;
if ((sfd = open("/dev/ttyv0", O_RDWR)) == -1) {
printf("Failed to open console - %s\n", strerror(errno));
exit(5);
}
if (ioctl(sfd, KDSKBMODE, K_XLATE) == -1)
printf("ioctl failed - %s\n", strerror(errno));
close(sfd);
}
--- CUT HERE ---
---------------------------------------------------------------------
|Daniel O'Connor software and network engineer for Genesis Software |
|http://www.gsoft.com.au |
|The nice thing about standards is that there are so many of them to|
|choose from. -- Andrew Tanenbaum |
---------------------------------------------------------------------
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802180903.TAA06360>
