Re: Error in inserting module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 12/24/05, Parag N(पराग़) <panemade@xxxxxxxxx> wrote:
Hi prasad,
On 12/23/05, prasad Musale <prasad.musale@xxxxxxxxx > wrote:
> Friends,
> I am doing my final year project on filesystem RAIF(Redundant array of
> independent file systems). I want to study the basic design of file system
> using ramfs. I am inserting functions step by step & also inserting printk ,
> so that i can find the flow of particular commands like mkdir or functions
> like open,read etc. Even though i can use these functions from fs/inode.c i
> don't want to disturb kernel code every time, which will require to compile
> kernel every time. By using only specific code in my file i can precisely
> understand the working. But now i am stuck at this point. Do u know any
> better solution? Plz convey me.

  why dont you try strace commad? i dont know how much it will help
you but its very good command to find which C library functions are
called by any command on linux.
  and if you want in kernel, tracing the flow of any function/command
you can use http://lxr.linux.no/ and easily check which functions are
calling which other functions.

>
>
>
>
> On 12/23/05, Parag N(पराग़) <panemade@xxxxxxxxx > wrote:
> > Hi,
> >    You added 2 functions alloc_inode and new_inode from
> > /usr/src/linux/fs/inode.c to /usr/src/linux/fs/ramfs . You add
> > alloc_inode because new_inode requires it ok.
> > but why you want to do that as i think already new_inode in
> > /usr/src/linux/fs/ramfs/inode.c calling its function definition from
> > /usr/src/linux/fs/inode.c
> >     so you can directly recompile kernel with ramfs support(which is
> > default in 2.6.14.3) and insert module.
> > regards,
> > Parag.
> >
> > On 12/22/05, prasad Musale < prasad.musale@xxxxxxxxx> wrote:
> > > Hello friends,
> > >                        I have problem with inserting a ramfs module. I
> > > have changed the inode.c file in /usr/src/linux/fs/ramfs. I am
> > > inserting the alloc_inode & new_inode function from the
> > > /usr/src/linux/fs/inode.c file. I am just checking how ramfs work.
> > > Though compilation works, insertion of modul gives error:
> > >                      Error inserting module: -1 unknown variable.
> > > I have run ramfs code without those 2 functions. But now it's giving
> > > problem.It shows no error at compilation. I have even tried to
> > > recompile kernel, but no use. Will u plz help me as early as possible.
> > >
> > > Thanks.
> > >
> > > --
> > > Kernelnewbies: Help each other learn about the Linux kernel.
> > > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > > FAQ:           http://kernelnewbies.org/faq/
> > >
> > >
> >
>
>
Regards,
Parag.
 
 
Thanks for ur suggestions. I already have LXR on my comp & i am also reading from it. But to verify run time behaviour I have to run the module. I have completed the original ramfs code with printk in it & it runs successfully. But for understanding purpose I want to go down in code hierarchy by insering the various functions, which is not possible when I tries to insert new_inode & alloc_inode. Even I get warning when I inserted init_special_inode(). It's giving warning for  def_chr_fops,def_blk_fops,def_fifo_fops not defined, which is present in file fs/inode.c. If I tries to insert those specific files which contains above declaration like fs/char_dev.c it's creating more problems of multiple declaration.
If there is no solution I will study it from LXR.But plz tell me what that error tells.Means if it's compiled successfully, why it's giving error at the time of inserting module?
 
Thanks. 
 

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux