summaryrefslogtreecommitdiff
path: root/lists.c
diff options
context:
space:
mode:
author0xwille2011-07-12 20:51:00 +0200
committer0xwille2011-07-12 20:51:00 +0200
commit389cc1ba8d9e673f1313fd966820c6d9d463525f (patch)
tree77bac88a1faa54c28e8d38bcee7485c742680105 /lists.c
parentc8f116e17b471704abbb3b1508733aa1bddda7da (diff)
downloadlkm-389cc1ba8d9e673f1313fd966820c6d9d463525f.tar.gz
AƱadido pid
Diffstat (limited to 'lists.c')
-rw-r--r--lists.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/lists.c b/lists.c
deleted file mode 100644
index 2eee70c..0000000
--- a/lists.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <linux/kernel.h>
-#include <linux/module.h>
-
-#define LENGTH 5
-
-struct node {
- struct list_head l;
- int dato;
-};
-
-int init_module(void)
-{
- int i;
- struct node head, aux[LENGTH], *aux2;
- struct list_head* iter;
-
- INIT_LIST_HEAD(&head.l);
- head.dato = 666;
-
- for (i = 0; i < LENGTH; i++) {
- aux[i].dato = i;
-
- list_add_tail(&aux[i].l, &head.l);
- }
-
- list_for_each(iter, &head.l) {
- aux2 = list_entry(iter, struct node, l);
- printk(KERN_INFO "%d", aux2->dato);
- }
-
- printk(KERN_INFO "Por cierto, en 0x0 hay: %d", ((struct node *)0)->dato);
-
- return 0;
-}
-
-void cleanup_module(void)
-{
-}
-
-MODULE_AUTHOR("Guillermo Ramos");
-MODULE_LICENSE("GPL");