On Sun, Sep 26, 2010 at 12:10 PM, Venkatram Tummala <[email protected]>wrote:
> Yes, it is possible to pass in 0 for register_chrdev. Please be clear what > you want to achieve, from your subject line & the post. The subject line & > the first few lines of the post indicates that > That is not my fault if you do not read the thread for one character even I was able to make it. > you need something which prints only the last character. And you go on > creating a rucus around here. > Who is creating rucus me or people giving me non sensical lecture to read malloc they hide their incompetency by giving lecture to Google. > I have updated the code & attached it. This can only read & write 10 > characters. Now, please dont tell us that it is not you wanted or it doesn't > work. Please spare us. > Your code is giving me some error I did Step 1) mknod /dev/bond c 0 0 Step 2) chmod 666 /dev/bond Step 3) insmod bond.ko Step 4) r...@bond:~# lsmod | grep bond bond 2031 0 Step5) echo -n abcde > /dev/bond gives me error *bash: /dev/bond: No such device or address *Step 6) where* *as I can see ls -l /dev/bond* *crw-rw-rw- 1 root root 0, 0 2010-09-26 12:14 /dev/bond in your code you have done in memory_read *f_pos = *f_pos + count; why have you done this? What purpose it serves?
