projects
/
my-code
/
kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added current struct
[my-code/kernel.git]
/
hello
/
hello.c
diff --git
a/hello/hello.c
b/hello/hello.c
index
74ace2a
..
cf6bd93
100644
(file)
--- a/
hello/hello.c
+++ b/
hello/hello.c
@@
-2,9
+2,12
@@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kernel.h>
+#include <linux/sched.h>
int init_module(void) {
printk(KERN_ALERT "hi hackbard, here is your kernel speaking! :)\n");
int init_module(void) {
printk(KERN_ALERT "hi hackbard, here is your kernel speaking! :)\n");
+ printk(KERN_ALERT "some info : %s has process id %i\n",current->comm,
+ current->pid);
return 0;
}
return 0;
}