<br>thanks rajat but i need it in kernel space.<br><div class="gmail_quote">On Tue, Feb 15, 2011 at 5:00 PM, Rajat Sharma <span dir="ltr"><<a href="mailto:fs.rajat@gmail.com">fs.rajat@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">well just do a readdir and count yourself where you find a match!!<br>
<br>
-Rajat<br>
<div><div></div><div class="h5"><br>
On Tue, Feb 15, 2011 at 4:44 PM, mohit verma <<a href="mailto:mohit89mlnc@gmail.com">mohit89mlnc@gmail.com</a>> wrote:<br>
> hi all,<br>
> is there any way to find out the offset or the directory entry number of a<br>
> file in the directory ?<br>
><br>
> let me explain a bit more:<br>
><br>
> when we open a drectory via open(2) and find out the directory entry by<br>
> readdir(2,3) or getdents(2) it automatically increases to the next<br>
> directory entry and fills in the dirent structure.<br>
> but in kernel space , let we have the parent directory name and child of it<br>
> . so is there any way to figure out at what offset or what number (exactly)<br>
> that perticular child will occur in the directory contains?<br>
><br>
> --<br>
> ........................<br>
> MOHIT VERMA<br>
><br>
</div></div>> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
><br>
</blockquote></div><br><br clear="all"><br>-- <br>........................<div><i>MOHIT VERMA</i></div><br>