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

Re: ext3 file system info





On 11/7/06, dreamfly281 <dreamfly281@xxxxxxxxx> wrote:
Nishan Naseer wrote:
>
>
> On 11/7/06, *Deepak Joshi* <deepak_cins@xxxxxxxxxxx
> <mailto:deepak_cins@xxxxxxxxxxx >> wrote:
>
>     Hi all,
>
>     I am very new to ext3 file system. I want to write a simple module
>     by using which i can get the inode of file if i will give the name
>     of the file. i read about the inode structure. But couldn't able
>     to make out how to start.
>
>     Please help me in writing this module. and please help me in
>     understanding complete ext3 file system.
>
>     Thanks and Regards,
>     Deepak Joshi.
>
>     Send instant messages to your online friends
>     http://uk.messenger.yahoo.com
>
>
>
> You can read th einfo pag eof libext2fs. The header files are also
> well documented.
>
>
>  ~
>    cheers,
>      nishan.
>

I think you can get it by call path_lookup(const char *path, unsigned
flags, struct nameidata *nd)


BR
lyb

"path_lookup" may not be exported by some kernel versions, instead you can use "path_init" and "path_walk" together to get the inode info.  Further you will get the inode info from the dentry field in nameidata structure. See the code of path_lookup if you have any doubts.

regards
prashant.