lkml.org 
[lkml]   [2004]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Inode question
From
Date
On Wed, 2004-07-21 at 15:46, sankarshana rao wrote:
> Thx for the reply...
> When I try to call lookup() from my kernel module, it
> gives undefined symbol error during INSMOD..
> any clues???

Not lookup, but path_lookup.

#include <linux/namei.h>
struct nameidata nd;
rc = path_lookup(path, LOOKUP_FOLLOW, &nd);
if (rc)
file not found
else
inum = nd.dentry->d_inode->i_ino;
path_release(&nd);

> --- Dave Kleikamp <shaggy@austin.ibm.com> wrote:
> > On Wed, 2004-07-21 at 13:39, sankarshana rao wrote:
> > > Hi,
> > > I want to call namei() function in order to derive
> > an
> > > inode from a path name. Can I do this inside a
> > kernel
> > > module???
> >
> > >From a kernel module, you should probably call
> > path_lookup().
> >
> > Shaggy
--
David Kleikamp
IBM Linux Technology Center

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.048 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site