Re: readdir question...

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

 




>I have a question about the readdir function for >filesystems.  Readdiruses a function "filldir" which (as >far as i can tell) puts entries out there and then the >function "lookup" actually goes out and gives them inodes 

AFAIK readdir is used to read an entire directory & lookup 
is used to get the inode corresponding to a particular 
directory entry. So its not neccessary that lookup will be called after readdir. For eg. doing an ls in /usr/src will call lookup("/usr/src"), which will return the inode corresponding to /usr/src directory, then readdir will be called to read the directory. (Please correct me if i am wrong).

>(this is my rough understanding).  My question is I need >to check to see if a file has already been "filldir"ed.  

Why do you need to do this ?

Swapnil.


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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