nanogui: patch: make kbd_tty aware of graphics mode


Previous by date: 5 Jul 2005 19:35:00 +0100 socket() system call failed!, "=?gb2312?B?0KTIzQ==?="
Next by date: 5 Jul 2005 19:35:00 +0100 Another problem when run nano-X, "=?gb2312?B?0KTIzQ==?="
Previous in thread:
Next in thread: 5 Jul 2005 19:35:00 +0100 Re: patch: make kbd_tty aware of graphics mode, Greg Haerr

Subject: patch: make kbd_tty aware of graphics mode
From: Joshua Malone ####@####.####
Date: 5 Jul 2005 19:35:00 +0100
Message-Id: <42CAD2D1.500@applieddata.net>

Hello,

I don't believe there have been updates for this, but we have a patch to 
kbd_tty.c that switches a framebuffer to graphics mode to eliminate 
interference from a tty login/getty that may be running.  It's a 4-liner 
to one file and solves our problems much better than setting the cursor 
invisible, etc.

-Josh

-- 

Joshua Malone                            Linux Engineer
Applied Data Systems                www.applieddata.net
434-244-9504                    ####@####.####


--- drivers/kbd_tty.c	2002-08-21 12:36:18.000000000 -0400
+++ /tmp/kbd_tty.c	2005-06-29 11:03:35.000000000 -0400
@@ -12,6 +12,8 @@
 #include <unistd.h>
 #include <errno.h>
 #include <termios.h>
+#include <linux/kd.h>
+#include <sys/ioctl.h>
 #include "device.h"
 
 #if ELKS
@@ -78,6 +80,9 @@
 
 	if(tcsetattr(fd, TCSAFLUSH, &new) < 0)
 		goto err;
+
+	ioctl(fd, KDSETMODE, KD_GRAPHICS);
+
 	return fd;
 
 err:
@@ -93,6 +98,7 @@
 static void
 TTY_Close(void)
 {
+	ioctl(fd, KDSETMODE, KD_TEXT);
 	tcsetattr(fd, TCSANOW, &old);
 	close(fd);
 	fd = 0;

Previous by date: 5 Jul 2005 19:35:00 +0100 socket() system call failed!, "=?gb2312?B?0KTIzQ==?="
Next by date: 5 Jul 2005 19:35:00 +0100 Another problem when run nano-X, "=?gb2312?B?0KTIzQ==?="
Previous in thread:
Next in thread: 5 Jul 2005 19:35:00 +0100 Re: patch: make kbd_tty aware of graphics mode, Greg Haerr


Powered by ezmlm-browse 0.20.