1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* $Id: namei.h,v 1.6 1997/07/17 02:24:25 davem Exp $
* linux/include/asm-sparc/namei.h
*
* Routines to handle famous /usr/gnemul/s*.
* Included from linux/fs/namei.c
*/
#ifndef __SPARC_NAMEI_H
#define __SPARC_NAMEI_H
#define SPARC_BSD_EMUL "usr/gnemul/sunos/"
#define SPARC_SOL_EMUL "usr/gnemul/solaris/"
#if 0 /* XXX FIXME */
extern int __namei(int, const char *, struct inode *, char *, struct inode **,
struct inode **, struct qstr *, struct dentry **, int *);
static __inline__ int
__prefix_namei(int retrieve_mode, const char * name, struct inode * base,
char * buf, struct inode ** res_dir, struct inode ** res_inode,
struct qstr * last_name, struct dentry ** last_entry,
int * last_error)
{
int error;
if (!(current->personality & (PER_BSD|PER_SVR4)))
return -ENOENT;
while (*name == '/')
name++;
atomic_inc(¤t->fs->root->i_count);
error = __namei(NAM_FOLLOW_LINK,
current->personality & PER_BSD ?
SPARC_BSD_EMUL : SPARC_SOL_EMUL, current->fs->root,
buf, NULL, &base, NULL, NULL, NULL);
if (error)
return error;
error = __namei(retrieve_mode, name, base, buf, res_dir, res_inode,
last_name, last_entry, last_error);
if (error)
return error;
return 0;
}
#endif /* XXX FIXME */
#endif /* __SPARC_NAMEI_H */
|