aboutsummaryrefslogtreecommitdiff
path: root/khm
diff options
context:
space:
mode:
authorGuillermo Ramos2011-09-20 20:29:58 +0200
committerGuillermo Ramos2011-09-20 20:29:58 +0200
commit161cc97a59078a606c41c2ec2a6371dc04d5aac8 (patch)
tree8fe91b65c09f6d61e4309d65148a2d8f845e2c3b /khm
parent4dc487c601ff19310ca7553105cc405c5b6095ee (diff)
downloadevspy-161cc97a59078a606c41c2ec2a6371dc04d5aac8.tar.gz
Optional AltGr registering implemented
Diffstat (limited to 'khm')
-rw-r--r--khm/Makefile8
-rw-r--r--khm/test_khm.c9
2 files changed, 15 insertions, 2 deletions
diff --git a/khm/Makefile b/khm/Makefile
new file mode 100644
index 0000000..74ffd5f
--- /dev/null
+++ b/khm/Makefile
@@ -0,0 +1,8 @@
+obj-m += test.o
+test-objs := khm.o test_khm.o
+
+all:
+ make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
+
+clean:
+ make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
diff --git a/khm/test_khm.c b/khm/test_khm.c
index 5b822b5..d8b0180 100644
--- a/khm/test_khm.c
+++ b/khm/test_khm.c
@@ -1,6 +1,6 @@
#include <linux/module.h>
#include <linux/init.h>
-#include "khashmap.h"
+#include "khm.h"
#define Z_ASD 1
#define Z_QWE 2
@@ -14,6 +14,11 @@ static int __init test_init(void)
hm = khm_create();
+ if ((values = (char*)khm_get(hm, Z_BLR)))
+ printk(KERN_ALERT "ERROR: Z_BLR exists: %s\n", values);
+ else
+ printk(KERN_ALERT "Z_BLR does not exist (good)\n");
+
if (khm_insert(hm, Z_ASD, "ASDF"))
goto insert_err;
if (khm_insert(hm, Z_QWE, "QWERTY"))
@@ -46,7 +51,7 @@ static int __init test_init(void)
return 0;
insert_err:
- printk(KERN_ALERT "Error inserting!\n");
+ printk(KERN_ALERT "Error inserting (good)\n");
return 0;
}