> Dan Danillo wrote: > > > Dan Danillo wrote: > > >> Hello, > > >> > > >> I'm trying to find out how to browse the file system from the > > >> linux kernel. Especially the directory content is interesting to > > >> me. Can anyone give me a hint? Are there even some libc like > > >> functions to do that ? > > > You might want to read this: > > > > > > http://kernelnewbies.org/FAQ/WhyWritingFilesFromKernelIsBad > > > > OK, I don't understand it all, but I get the meaning that I should > > not access the file system from the kernel. Then I have no idea how > > to solve my problem. > > > > Maybe you can propose something else. Please have a look here: > > > http://groups.google.com/group/comp.os.linux.embedded/browse_thread/thread/169cc7835af4fd7f/784b3081b0d12072 > > > I'm afraid I'm not sure how to go about this either. As I understand it, you > want to emulate a USB mass-storage device containing a FAT file system, > utilizing the contents of a local file system which may be formatted using a > different file system? Yes, that is correct > Could you create a daemon that attaches to a usb gadget driver? The daemon in > user space would be able to access whichever file system you want? I could try that, but I did not want to touch g_file_storage. Instead I wanted to write my own block device driver which is used by g_file_storage in turn. So the daemon would be connected to my driver then .. I don't know, that sounds complicated. > Either that or look at the NFS kernel server code? I assume that this must be > doing something similar to what you want to do, just for networking rather than > USB. No, I didn't, but now that you mention it i can see the similarities - I will have a look. > Martyn > Thank you, Dan -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ