- 论坛徽章:
- 0
|
求助:关于linux device drivers的问题
我搜索到54个version.h文件,也不知道你说的是哪一个。是不是usr/include/linux里的那个?
我察看了里面的内容如下:
[root@localhost root]# cat /usr/include/linux/version.h
#define UTS_RELEASE "2.4.20"
#define LINUX_VERSION_CODE 132116
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << + (c))
已经是2.4.20了,没有2.4.20-8,不知道下面的两行是什么?
我把版本号改成了2.4.20-8并编译运行结果如下:
[root@localhost root]# gcc -c hello.c
[root@localhost root]# insmod ./hello.o
Warning: loading ./hello.o will taint the kernel: no license
See http://www.tux.org/lkml/#export-tainted for information about tainted modules
Module hello loaded, with warnings
[root@localhost root]# gcc -c hello.c
[root@localhost root]# insmod ./hello.o
insmod: a module named hello already exists
[root@localhost root]# rmmod ./hello.o
rmmod: module ./hello.o is not loaded
并没有出现书中所说的结果(
root# insmod ./hello.o
hello,world ) |
|