Re: what's the value of "MODULE_STACKSIZE"? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
Hi,
>
> i was trying this with the "hello world" module
>
> -----8<---------------
> /*
> * hello-1.c - The simplest kernel module.
> */
> #include <linux/module.h> /* Needed by all modules */
> #include <linux/kernel.h> /* Needed for KERN_INFO */
> int init_module(void)
> {
> printk(KERN_INFO "Hello world 1.\n");
> /*
> * A non 0 return means init_module failed; module can't be loaded.
> */
> return 1;
> }
> void cleanup_module(void)
> {
> printk(KERN_INFO "Goodbye world 1.\n");
> }
> ---8<----------------------
>
> But when i try to get modinfo, its fail to find the module:-
>
> localhost:/home/adil/module/sample # insmod hello-1.ko
> localhost:/home/adil/module/sample # modinfo hello-1
> modinfo: could not find module hello-1
> localhost:/home/adil/module/sample # lsmod | grep hello
> hello_1 1280 0
> localhost:/home/adil/module/sample # rmmod hello_1
> localhost:/home/adil/module/sample # lsmod | grep hello
> localhost:/home/adil/module/sample #
>
> Am i missing anything?
>
Can you load the module with modprobe? If modprobe cannot find
the module, neither can modinfo.
The module should be put into system module directory and do
depmod -a
Regards,
Wenhua
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ
[Newbies FAQ] [Kernel List] [Site Home] [IETF Annouce] [Git] [Networking] [Security] [Bugtraq] [Rubini] [Photo] [Yosemite] [MIPS Linux] [ARM Linux] [Linux Security] [Linux Networking] [Linux RAID] [Linux SCSI] [Linux ACPI] [DDR & Rambus] [UNIX Filesystems] [Linux Resources]
![]() |
![]() |