Re: Printing the messages through printk while using Xwindows.

From: James Simmons (jsimmons@acsu.buffalo.edu)
Date: Fri Jul 28 2000 - 18:16:07 EST


> > Therefore, its fine if you've got one of the few cards that fbcon
> > works with. Otherwise you're using vgacon, and it doesn't work.
>
> It does actually work on plain vga without any fb support at all. Try it
> and see. Here is a little ready-to-compile module for you to try.
...
> print_string(char *str)
> {
> struct tty_struct *tty = current->tty;
>
> (*tty->driver.write)(tty, 0, str, strlen(str));
> (*tty->driver.write)(tty, 0, "\015\012", 2);
> }

First why not use printk ? Second I don't think this approach is not
safe. Take a look at tty_io.c to see what is really involved to write to
tty. If you really want to write to a VT via the tty layer look at
respond_string in console.c. Note that is only for VTs.

Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.

James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:28 EST