hello everybody,
As,in gui modes any messages are not shown on the terminal ,and for every printk messages that i use in my driver code ihave to dmesg to see whether it is printed or not,i wnt to explicitly call certain functions so taht all the messages are printed in the gui shell.
but i dont know how to access the struct tty_struct corresponding to the pts that i m using,so that i can explicitly change the behaviour of write and read operations in struct tty_driver.
i tried using devpts_get_tty(int number),but it is showing error
UNDEFINED SYMBOL devpts_get_tty(int number) ,though this symbol is defined in my System.map file.
I m using FC3,kernel 2.6.11.
is there any way i can access the struct tty_struct corresponding to my pts
waiting for the reply
xconsole
you want to use xconsole instead (started as root to get access to /dev/xconsole) and/or customize /etc/syslog.conf to route all including the informational messages (*.info) or all kernel messages (kern.*) to a suitable location; alternately just watch /var/log/kern.log or wherever syslogd routes this.
accessing struct tty_struct
thanx strcmp....
as u said regarding root access to /dev/xconsole,there is no /dev/xconsole file in my system.i think the gui console runs from /dev/pts/0 or /dev/pts/1.
also there is no /var/log/kern.log file in my system.
i went through the syslog.conf file and as such there was no entry like
kern.*= xxxxxxxx
so i added the line
kern.*=/dev/pts/0
is it fine??but this doesnt work and still i have to run dmesg to see the printk messages that i have used in my code
also,as i said,i want to do that thru a C program,how do i access
the struct tty_struct corresponding to /dev/pts/0
my system is a FC3 and kernel is 2.6.11.1
thanx again for the response
what i tried to tell you
what i tried to tell you was, that linux and unix in general have plenty of tried and tested facilities to route messages from their subsystems where you want them. maybe debian's tools differ somewhat from fc3's, but it should certainly be doable and is a far easier and better solution than patching kernel routines (because they already support that feature, see above). if you are able to write kernel code, you should _certainly_ be able to grasp syslog. maybe you have to print your messages with an appropriate priority, just look into the documentation of printk()/syslog().
UNDEFINED SYMBOL,though the symbol is defined in System.map file
hi everybody
,i m writing a code to tweak the working of tty a bit,for which i m using the API devpts_get_tty,defined in
and the symbol is also given in System.map file
yet when i m compiling the code i m getting the error
devpts_get_tty,undefined symbol.
Do i need to explicitly do anything other than #include .
ANY INPUT IS APPRECIATED
waiting for reply
regards
rakesh