projects
/
my-code
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
395fd5f
)
-
author
hackbard
<hackbard>
Fri, 17 Jan 2003 20:55:36 +0000
(20:55 +0000)
committer
hackbard
<hackbard>
Fri, 17 Jan 2003 20:55:36 +0000
(20:55 +0000)
hello/Makefile
patch
|
blob
|
history
hello/hello.c
patch
|
blob
|
history
diff --git
a/hello/Makefile
b/hello/Makefile
index
6339fdd
..
5947db3
100644
(file)
--- a/
hello/Makefile
+++ b/
hello/Makefile
@@
-1,8
+1,8
@@
# Makefile of hello.o - my first kernel module.
INCLUDEDIR = /usr/include
# Makefile of hello.o - my first kernel module.
INCLUDEDIR = /usr/include
-
-CFLAGS = -D__KERNEL__ -DMODULE -O -Wall -I$(INCLUDEDIR)
+CC = gcc
+CFLAGS = -D__KERNEL__ -DMODULE -O -Wall
#
-I$(INCLUDEDIR)
# findout kernel version.
VER = $(shell awk -F\" '/REL/ {print $$2}' $(INCLUDEDIR)/linux/version.h)
# findout kernel version.
VER = $(shell awk -F\" '/REL/ {print $$2}' $(INCLUDEDIR)/linux/version.h)
diff --git
a/hello/hello.c
b/hello/hello.c
index
48bcb33
..
74ace2a
100644
(file)
--- a/
hello/hello.c
+++ b/
hello/hello.c
@@
-1,14
+1,14
@@
/* my first kernel driver :-) */
/* my first kernel driver :-) */
-#define MODULE
#include <linux/module.h>
#include <linux/module.h>
+#include <linux/kernel.h>
int init_module(void) {
int init_module(void) {
- printk(
"<1>
hi hackbard, here is your kernel speaking! :)\n");
+ printk(
KERN_ALERT "
hi hackbard, here is your kernel speaking! :)\n");
return 0;
}
void cleanup_module(void) {
return 0;
}
void cleanup_module(void) {
- printk(
"<1>
bye hackbard ...\n");
+ printk(
KERN_ALERT "
bye hackbard ...\n");
}
}