- 论坛徽章:
- 0
|
我在做动模块设备驱动的实验,根据您教的方法,程序通过了,也成功地装载上了,可是建立文件系统的时候出现了问题。如下:
[root@localhost root]# make
make -C /lib/modules/2.6.15.1/build SUBDIRS=/root modules
make[1]: Entering directory `/usr/src/linux-2.6.15.1'
Building modules, stage 2.
MODPOST
make[1]: Leaving directory `/usr/src/linux-2.6.15.1'
[root@localhost root]# insmod simple_blkdev.ko
insmod: error inserting 'simple_blkdev.ko': -1 File exists
[root@localhost root]# lsmod|grep simple
simple_blkdev 16779240 0
[root@localhost root]# ls -l /dev |grep simple
brw-r--r-- 1 root root 244, 0 4ÔÂ 24 15:29 simple_blkdev
mke2fs 1.41.11 (14-Mar-2010)
mkfs.ext3: No such device or address while trying to determine filesystem size
[root@localhost root]#
我怀疑是主设备号有问题,我在程序里写了个500 ,可是这里变成了244。我刚接触linux,还不太懂 |
|