Re: Redirecting output
shafa.hidee <[EMAIL PROTECTED]> wrote: > I have created a dummy module for learning device driver in linux. I > want to redirect the standard output of printk to my xterm. But by default > it is redirected to tty. tail -f /var/log/syslog (or /var/log/messages) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Redirecting output
"shafa.hidee" <[EMAIL PROTECTED]> wrote: > > I have created a dummy module for learning device driver in linux. I > want to redirect the standard output of printk to my xterm. But by default > it is redirected to tty. > > I have remote logged into the machine. You can do this from within the module_init() handler only: module_init_handler(...) { mm_segment_t old_fs; old_fs = set_fs(KERNEL_DS); sys_write(1, "foo\n", 4); set_fs(old_fs); ... } The text comes out on modprobe's standard output. Don't tell anyone I told you this. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Redirecting output
shafa.hidee [EMAIL PROTECTED] wrote: I have created a dummy module for learning device driver in linux. I want to redirect the standard output of printk to my xterm. But by default it is redirected to tty. I have remote logged into the machine. You can do this from within the module_init() handler only: module_init_handler(...) { mm_segment_t old_fs; old_fs = set_fs(KERNEL_DS); sys_write(1, foo\n, 4); set_fs(old_fs); ... } The text comes out on modprobe's standard output. Don't tell anyone I told you this. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Redirecting output
shafa.hidee [EMAIL PROTECTED] wrote: I have created a dummy module for learning device driver in linux. I want to redirect the standard output of printk to my xterm. But by default it is redirected to tty. tail -f /var/log/syslog (or /var/log/messages) - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Redirecting output
hoi :) On Wed, Mar 23, 2005 at 12:12:02PM +0530, shafa.hidee wrote: > I have created a dummy module for learning device driver in linux. I > want to redirect the standard output of printk to my xterm. But by default > it is redirected to tty. The kernel does not have 'standard output', so you can't redirect it. Please consult the manual for dmesg and syslog. And please have a look at a good Linux kernel book. This will help you understand the kernel and will answer most of your questions. -- Martin Waitz signature.asc Description: Digital signature
Re: Redirecting output
>Hi, > I have created a dummy module for learning device driver in linux. I >want to redirect the standard output of printk to my xterm. But by default >it is redirected to tty. What shall happen if you close the pts of the xterm? Jan Engelhardt -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Redirecting output
Hi, I have created a dummy module for learning device driver in linux. I want to redirect the standard output of printk to my xterm. But by default it is redirected to tty. I have remote logged into the machine. Please help. Regards Shafa.hidee - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Redirecting output
Hi, I have created a dummy module for learning device driver in linux. I want to redirect the standard output of printk to my xterm. But by default it is redirected to tty. I have remote logged into the machine. Please help. Regards Shafa.hidee - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Redirecting output
Hi, I have created a dummy module for learning device driver in linux. I want to redirect the standard output of printk to my xterm. But by default it is redirected to tty. What shall happen if you close the pts of the xterm? Jan Engelhardt -- - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: Redirecting output
hoi :) On Wed, Mar 23, 2005 at 12:12:02PM +0530, shafa.hidee wrote: I have created a dummy module for learning device driver in linux. I want to redirect the standard output of printk to my xterm. But by default it is redirected to tty. The kernel does not have 'standard output', so you can't redirect it. Please consult the manual for dmesg and syslog. And please have a look at a good Linux kernel book. This will help you understand the kernel and will answer most of your questions. -- Martin Waitz signature.asc Description: Digital signature