lkml.org 
[lkml]   [1997]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject2.1.72 /dev/console fix
Date
Some people noted that in 2.1.72, the new /dev/console (c 5 1) doesn't
work if you don't add "console=tty0" on the kernel command line. Here's
a patch to fix it. Oh and it also lets tga.c compile again.

Let me know if it doesn't work for you ..

diff -ruN linux-2.1.72.orig/drivers/char/tga.c linux-2.1.72/drivers/char/tga.c
--- linux-2.1.72.orig/drivers/char/tga.c Thu Dec 4 00:21:57 1997
+++ linux-2.1.72/drivers/char/tga.c Thu Dec 11 15:27:29 1997
@@ -27,6 +27,7 @@
#include <linux/bios32.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/console.h>

#include <asm/io.h>
#include <asm/system.h>
@@ -446,14 +447,21 @@

/*
* See if we have a TGA card.
+ * Just a placeholder at the moment, because of the strange
+ * way the TGA card is initialized. This has to be enabled when
+ * the kernel initializes PCI devices before the console.
*/
-__initfunc(int con_is_present())
+__initfunc(int con_is_present(void))
{
+#if 0
+ unsigned char pci_bus, pci_devfn;
int status;

status = pcibios_find_device (PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TGA,
0, &pci_bus, &pci_devfn);
return (status == PCIBIOS_DEVICE_NOT_FOUND) ? 0 : 1;
+#endif
+ return 1;
}

/*
diff -ruN linux-2.1.72.orig/kernel/printk.c linux-2.1.72/kernel/printk.c
--- linux-2.1.72.orig/kernel/printk.c Sun Dec 7 21:06:56 1997
+++ linux-2.1.72/kernel/printk.c Fri Dec 12 21:54:13 1997
@@ -317,6 +317,8 @@
* that registers here.
*/
if (selected_console == 0) {
+ if (console->index < 0)
+ console->index = 0;
if (console->setup == NULL ||
console->setup(console, NULL) == 0) {
console->flags |= CON_ENABLED | CON_FIRST;
Mike.
--
Miquel van Smoorenburg | Studying to be a technomage <*>
miquels@cistron.nl | "May you live in interesting times"
\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.024 / U:17.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site