Re: How to access a file from kernel module

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

 



Hi Lateef,
I followed up your code, and its perfectly working!!!.
Thanks a lot. I didn't quite get what Hemminger and
you were talking about; I heard abt ioctl, but dont
know any more than that name. Could you help me figure
out those possibilities too? 


--- Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:

> 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
> 




		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com
-
: 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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux