summaryrefslogtreecommitdiff
path: root/hello/hello-4.c
diff options
context:
space:
mode:
author0xwille2011-06-24 13:57:37 +0200
committer0xwille2011-06-24 13:57:37 +0200
commitc73b83935734bf0a9b56183a2535dd0daba221fe (patch)
tree17962f67c24fcee8bd0ff292332365294cc366b7 /hello/hello-4.c
downloadlkm-c73b83935734bf0a9b56183a2535dd0daba221fe.tar.gz
Commit inicial
Diffstat (limited to 'hello/hello-4.c')
-rw-r--r--hello/hello-4.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/hello/hello-4.c b/hello/hello-4.c
new file mode 100644
index 0000000..32e2cb6
--- /dev/null
+++ b/hello/hello-4.c
@@ -0,0 +1,28 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+static int __init hello_4_init(void)
+{
+ printk(KERN_DEBUG "DEBUG: Hola, mundo! 4\n");
+ printk(KERN_INFO "INFO: Hola, mundo! 4\n");
+ printk(KERN_NOTICE "NOTICE: Hola, mundo! 4\n");
+ printk(KERN_WARNING "WARNING: Hola, mundo! 4\n");
+ printk(KERN_CRIT "CRIT: Hola, mundo! 4\n");
+ printk(KERN_ALERT "ALERT: Hola, mundo! 4\n");
+ printk(KERN_EMERG "EMERG: Hola, mundo! 4\n");
+
+ return 0;
+}
+
+static void __exit hello_4_exit(void)
+{
+ printk(KERN_INFO "Adiós, mundo! 2\n");
+}
+
+module_init(hello_4_init);
+module_exit(hello_4_exit);
+
+MODULE_AUTHOR("Guillermo Ramos");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Módulo tonto");