On 2013-02-11 16:24:17 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
Have a look at this:
donno wats happening:
sunil@ubuntu:~/test/drive$ sudo rmmod helloworld sunil@ubuntu:~/test/drive$ lsmod|grep hellow* Binary file helloworld.ko matches Binary file helloworld.o matches
This doesn't actually do what you seem to think it does. You're not passing the 'hellow*' argument to grep. The 'hellow*' is first expaned by your shell, so it probably turns that command line into 'lsmod | grep helloworld.c helloworld.o helloworld.ko'. Try using 'lsmod | grep hellow' instead (i.e. without the *).
sunil@ubuntu:~/test/drive$ modprobe -r helloworld FATAL: Module helloworld not found.
Obviously, because your previous command succeeded. The module is no longer loaded. Regards, Kristof PS: Please don't top-post. PS 2: Please keep the mailing list in cc.
Hi kristof, when i executed the below line. i din't get what i suppose to get...the message "hello, world".. did i miss any steps sunil@ubuntu:~/test/drive$ sudo insmod helloworld.ko On Mon, Feb 11, 2013 at 4:34 PM, Kristof Provost <kristof@sigsegv.be> wrote:
On 2013-02-11 16:24:17 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
Have a look at this:
donno wats happening:
sunil@ubuntu:~/test/drive$ sudo rmmod helloworld sunil@ubuntu:~/test/drive$ lsmod|grep hellow* Binary file helloworld.ko matches Binary file helloworld.o matches
This doesn't actually do what you seem to think it does. You're not passing the 'hellow*' argument to grep. The 'hellow*' is first expaned by your shell, so it probably turns that command line into 'lsmod | grep helloworld.c helloworld.o helloworld.ko'. Try using 'lsmod | grep hellow' instead (i.e. without the *).
sunil@ubuntu:~/test/drive$ modprobe -r helloworld FATAL: Module helloworld not found.
Obviously, because your previous command succeeded. The module is no longer loaded.
Regards, Kristof
PS: Please don't top-post. PS 2: Please keep the mailing list in cc.
-- Regards, Sunil A S
On 2013-02-11 16:50:45 (+0530), sunil <sunil.slvphsn@gmail.com> wrote:
when i executed the below line. i din't get what i suppose to get...the message "hello, world"..
did i miss any steps sunil@ubuntu:~/test/drive$ sudo insmod helloworld.ko
The traces you've inserted in your kernel module do not print to stdout. They get logged in the kernel ring buffer. Try 'dmesg' after loading your module. Regards, Kristof
participants (2)
-
Kristof Provost -
sunil