2 * linux/include/asm-mips/namei.h
4 * Included from linux/fs/namei.c
6 * $Id: namei.h,v 1.10 1998/10/28 08:13:24 jj Exp $
8 #ifndef __ASM_MIPS_NAMEI_H
9 #define __ASM_MIPS_NAMEI_H
11 #include <linux/config.h>
13 /* Only one at this time. */
14 #define IRIX32_EMUL "usr/gnemul/irix/"
16 static inline struct dentry
*
17 __mips_lookup_dentry(const char *name
, int lookup_flags
)
21 if (current
->personality
!= PER_IRIX32
)
22 return ERR_PTR(-ENOENT
);
24 base
= lookup_dentry (IRIX32_EMUL
,
25 dget (current
->fs
->root
),
26 (LOOKUP_FOLLOW
| LOOKUP_DIRECTORY
));
28 if (IS_ERR (base
)) return base
;
30 base
= lookup_dentry (name
, base
, lookup_flags
);
32 if (IS_ERR (base
)) return base
;
36 return ERR_PTR(-ENOENT
);
42 #ifdef CONFIG_BINFMT_IRIX
44 #define __prefix_lookup_dentry(name, lookup_flags) \
45 dentry = __mips_lookup_dentry (name, lookup_flags); \
46 if (!IS_ERR (dentry)) return dentry;
48 #else /* !defined(CONFIG_BINFMT_IRIX) */
50 #define __prefix_lookup_dentry(name, lookup_flags) \
53 #endif /* !defined(CONFIG_BINFMT_IRIX) */
55 #endif /* __ASM_MIPS_NAMEI_H */