Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Jan Engelhardt
On Apr 7 2007 16:57, JanuGerman wrote: > >Thanks Jan for the response. > >>struct dentry *fbar = lookup_one_len("/foo/bar", current->fs->root); > >But that gives me a dentry, where as file object is still not reachable. So use filp_open. >Question: I am currently using a function called

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread JanuGerman
Thanks Jan for the response. >struct dentry *fbar = lookup_one_len("/foo/bar", current->fs->root); But that gives me a dentry, where as file object is still not reachable. Question: I am currently using a function called fs.h/dentry_open which takes a "dentry", "vfsmount" object and

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Robert Hancock
JanuGerman wrote: Hi Every one, I have got two questions regarding opening files within the Linux kernel. If some body can help me, in sorting out this problem, i will be very thankful. First off, likely not something you should be doing:

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Jan Engelhardt
On Apr 7 2007 06:58, JanuGerman wrote: >Hi Every one, > > I have got two questions regarding opening files within the Linux > kernel. If some body can help me, in sorting out this problem, i will > be very thankful. > >1) I have just a file path with me, an absolute path, but no dentry, >

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Roland Kuhn
Hi! On 7 Apr 2007, at 08:58, JanuGerman wrote: 1) I have just a file path with me, an absolute path, but no dentry, no inode, no vfsmount object, which function i can call to get a "file" object associated with the absoulte file path. I have surfed arround the source code especially

Two questions regarding Opening files within Kernel!

2007-04-07 Thread JanuGerman
Hi Every one, I have got two questions regarding opening files within the Linux kernel. If some body can help me, in sorting out this problem, i will be very thankful. 1) I have just a file path with me, an absolute path, but no dentry, no inode, no vfsmount object, which function i can

Two questions regarding Opening files within Kernel!

2007-04-07 Thread JanuGerman
Hi Every one, I have got two questions regarding opening files within the Linux kernel. If some body can help me, in sorting out this problem, i will be very thankful. 1) I have just a file path with me, an absolute path, but no dentry, no inode, no vfsmount object, which function i can

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Roland Kuhn
Hi! On 7 Apr 2007, at 08:58, JanuGerman wrote: 1) I have just a file path with me, an absolute path, but no dentry, no inode, no vfsmount object, which function i can call to get a file object associated with the absoulte file path. I have surfed arround the source code especially

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Jan Engelhardt
On Apr 7 2007 06:58, JanuGerman wrote: Hi Every one, I have got two questions regarding opening files within the Linux kernel. If some body can help me, in sorting out this problem, i will be very thankful. 1) I have just a file path with me, an absolute path, but no dentry, no

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Robert Hancock
JanuGerman wrote: Hi Every one, I have got two questions regarding opening files within the Linux kernel. If some body can help me, in sorting out this problem, i will be very thankful. First off, likely not something you should be doing:

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread JanuGerman
Thanks Jan for the response. struct dentry *fbar = lookup_one_len(/foo/bar, current-fs-root); But that gives me a dentry, where as file object is still not reachable. Question: I am currently using a function called fs.h/dentry_open which takes a dentry, vfsmount object and flag

Re: Two questions regarding Opening files within Kernel!

2007-04-07 Thread Jan Engelhardt
On Apr 7 2007 16:57, JanuGerman wrote: Thanks Jan for the response. struct dentry *fbar = lookup_one_len(/foo/bar, current-fs-root); But that gives me a dentry, where as file object is still not reachable. So use filp_open. Question: I am currently using a function called