> Hi all,
> this is probably a simple question but I am not sure where to look for
> the answer.  I have Rubini's Linux Device Drivers book, and I am trying
> to get his example Hello World module going.  I am running Red Hat 6.2
> kernel 2.2.14-5.0.  Here is the code that I use:
> 
> #define MODULE
> #include <linux/module.h>
> 
> int init_module(void) { printk("<1>Hello World\n"); return 0;}
> void cleanup_module(void) {printk("<1>Goodbye\n");}
> 
> and this is what I type when I am logged in as root:
> 
> # gcc -c hello.c
> # insmod hello.o
> 
> the message "Hello World" does not get displayed
> 
> then I type:
> 
> #rmmod hello
> 
> the message "Goodbye" does not get displayed.
> 
> I can tell (I think) that the module is being inserted because if I try to 
> insert it twice without removing it first, it says a module with that name 
> already exists.

use the dmesg command to see the output or tail /var/log/messages. Printk
sends output to the console which you can't see if you're running an
xterm (for example).


+==================================================================+
 Phil Daly, NOAO/AURA, 950 N. Cherry Avenue, Tucson AZ 85719, U S A
 E-mail: [EMAIL PROTECTED]  V-mail: (520) 318 8438  Fax: (520) 318 8360
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to