khello/khello.c
changeset 50 a38f102556e5
child 77 49e0babccb23
equal deleted inserted replaced
49:77094ec383cf 50:a38f102556e5
       
     1 /*
       
     2  *  hello-1.c - The simplest kernel module.
       
     3  */
       
     4 #include <linux/module.h>       /* Needed by all modules */
       
     5 #include <linux/kernel.h>       /* Needed for KERN_INFO */
       
     6 
       
     7 int init_module (void)
       
     8 {
       
     9     printk (KERN_INFO "Hello world 1.\n");
       
    10 
       
    11     /*
       
    12      * A non 0 return means init_module failed; module can't be loaded.
       
    13      */
       
    14     return 0;
       
    15 }
       
    16 
       
    17 void cleanup_module (void)
       
    18 {
       
    19     printk (KERN_INFO "Goodbye world 1.\n");
       
    20 }