1 /* $Id: namei.h,v 1.15 1999/06/10 05:23:17 davem Exp $
2 * linux/include/asm-sparc64/namei.h
4 * Routines to handle famous /usr/gnemul/s*.
5 * Included from linux/fs/namei.c
8 #ifndef __SPARC64_NAMEI_H
9 #define __SPARC64_NAMEI_H
11 #define SPARC_BSD_EMUL "usr/gnemul/sunos/"
12 #define SPARC_SOL_EMUL "usr/gnemul/solaris/"
14 static inline struct dentry
*
15 __sparc64_lookup_dentry(const char *name
, int lookup_flags
)
20 switch (current
->personality
) {
22 emul
= SPARC_BSD_EMUL
; break;
24 emul
= SPARC_SOL_EMUL
; break;
29 base
= lookup_dentry (emul
,
30 dget (current
->fs
->root
),
31 (LOOKUP_FOLLOW
| LOOKUP_DIRECTORY
));
33 if (IS_ERR (base
)) return NULL
;
35 base
= lookup_dentry (name
, base
, lookup_flags
);
37 if (IS_ERR (base
)) return NULL
;
40 struct dentry
*fromroot
;
42 fromroot
= lookup_dentry (name
, dget (current
->fs
->root
), lookup_flags
);
44 if (IS_ERR (fromroot
)) return base
;
46 if (fromroot
->d_inode
) {
57 #define __prefix_lookup_dentry(name, lookup_flags) \
58 if (current->personality) { \
59 dentry = __sparc64_lookup_dentry (name, lookup_flags); \
60 if (dentry) return dentry; \
63 #endif /* __SPARC64_NAMEI_H */