lkml.org 
[lkml]   [2000]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Printing the messages through printk while using Xwindows.

> > 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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.033 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site