Re: Why hello kernel module didn't output anything?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello there,

On Thu, Oct 04, 2001 at 02:08:00PM -0400, Hong Hsu wrote:
> 
> But how the module will be called as it suppose to send "Hello, world " 
> to either xterm or konsole? 
> ...
> int init_module()
> {
>    printk("Hello, world - this is the kernel speaking\n");

I think you did not get it. orintk puts a message in the kernel's message
buffer, which will then:
- be output to the console if the loglevel allows;
- be fetched by klogd, sent to syslogd, and finaly most likely saved into
  some log depending on your syslog setup.

printks don't "go to the terminal" like an application calling printf. If
the terminal is the kernel's console at the moment (see, this is not
konsole), and the console log level allows, it will end up being displayed
on that terminal, but this is a side effect. :)

I hope this helps, and hope I'm not saying bs.

-- 
Fábio Olivé Leite   http://www.conectiva.com.br/~olive
      I drowned in the universal pool of entropy
      Eris has saved me, and she has set me free
  A31F CCB3 6BC4 A875 27E7  C2B4 2A74 5690 F127 519B

PGP signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux