Hello world!

/** 始学C语言 Hello world! */
1
#include <stdio.h> 2 int main(int argc, char **argv) 3 { 4 printf("Hello,world\n"); 5 return 0; 6 }
/** 始学Linux驱动开始 Hello world */
1
#include <linux/init.h> 2 #include <linux/module.h> 3 MODULE_LICENSE("Dual BSD/GPL"); 4 static int hello_init(void) 5 { 6 printk(KERN_ALERT "Hello, world\n"); 7 return 0; 8 } 9 static void hello_exit(void) 10 { 11 printk(KERN_ALERT "Goodbye, cruel world\n"); 12 } 13 module_init(hello_init); 14 module_exit(hello_exit);

 

posted @ 2013-11-08 14:41  idi0t  阅读(147)  评论(0编辑  收藏  举报