On 9/16/05, Stephen Hemminger <shemminger@xxxxxxxx> wrote: > On Fri, 16 Sep 2005 15:38:14 +0100 (BST) > yenganti pradeep <pradeepls143@xxxxxxxxxxx> wrote: > > > > > Hi all, > > Is there any way to access a file from kernel > > module?? > > > > Thanx in advance, > > Pradeep. > > Almost always a bad idea. Among other problems: > * it ties your kernel module down to a particular file location. > * you end up tightly binding your kernel module and the file format > * the kernel namespace is not uniform and flat (given unionfs, bind > mount and chroot); a path name has no real guaranteed meaning! > > The correct way to do it if you have to is pass the information > down through some other channel. If you need a file handle for I/O > then pass the file handle, not the name. > - Yes you are right that its not good to access a file from the kernel and information must be passed through some other ways like sysfs/ioctls etc , but if any one need to do it to make things simpler than it can be done through doing system call from with-in the kernel ......... -- Fawad Lateef - : send the line "unsubscribe linux-net" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html