Sorry, I missed mentioning the kernel version: 2.6.32. What are the callers of vfs_readdir expected to do? I cannot use the generic callback fillonedir/filldir since they are defined in readdir.c and not exported for others. Should the caller implement his/her own filler function? Also, struct linux_dirent is defined in readdir.c. How can callers use this defintion? Should the caller define it in again his/her kernel module? Please let me know whether my understanding is correct. > -----Original Message----- > From: Viswanath, Logeswari P (MCOU OSTL) > Sent: Monday, July 06, 2015 7:59 PM > To: 'linux-fsdevel@xxxxxxxxxxxxxxx' > Subject: Reading contents of a directory inside kernel > > Hi, > > I am new to linux file system. I want to read the contents of a directory from > my linux kernel module. > Can anyone please explain how to use vfs_readdir for this? Or is there any > other kernel API which should be used for this? > > Regards, > Logeswari. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html