Hi Sam, On Sun, Nov 22, 2009 at 7:19 PM, Sam Carter <sam.w.carter@xxxxxxxxx> wrote: > Hi folks, > > If I have a file object in the kernel, and want to get hold of the files in > that dentry Object, how do I approach it? > I think walking a directory inside the kernel is not suggested. If you share what you are trying to achieve, it would better to help with your problem. > At the moment I'm trying something like, > > printk("%s\n", file->f_dentry->d_subdirs->next.d_name); > Remember, you can always have a negative dentry. How are you getting the file object. > However I'm getting an error based on not understanding the structures > correctly. Am I correct in thinking that if 'file' is a directory, d_subdirs > will hold the first file in that directory? How can I get hold of the names? > > Thanks, Sam > -- Regards, Sandeep. “To learn is to change. Education is a process that changes the learner.” -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ