Commit | Line | Data |
---|---|---|
805e021f CE |
1 | /* |
2 | * Copyright 2000, International Business Machines Corporation and others. | |
3 | * All Rights Reserved. | |
4 | * | |
5 | * This software has been released under the terms of the IBM Public | |
6 | * License. For details, see the LICENSE file in the top-level source | |
7 | * directory or online at http://www.openafs.org/dl/license10.html | |
8 | */ | |
9 | ||
10 | #ifndef __AFS_USROPS_H__ | |
11 | #define __AFS_USROPS_H__ 1 | |
12 | ||
13 | #ifdef KERNEL | |
14 | # include "afs/sysincludes.h" | |
15 | # include "afsincludes.h" | |
16 | #endif /* KERNEL */ | |
17 | ||
18 | /* | |
19 | * Macros to manipulate doubly linked lists | |
20 | */ | |
21 | #define DLL_INIT_LIST(_HEAD, _TAIL) \ | |
22 | { _HEAD = NULL ; _TAIL = NULL; } | |
23 | ||
24 | #define DLL_INSERT_TAIL(_ELEM, _HEAD, _TAIL, _NEXT, _PREV) \ | |
25 | { \ | |
26 | if (_HEAD == NULL) { \ | |
27 | _ELEM->_NEXT = NULL; \ | |
28 | _ELEM->_PREV = NULL; \ | |
29 | _HEAD = _ELEM; \ | |
30 | _TAIL = _ELEM; \ | |
31 | } else { \ | |
32 | _ELEM->_NEXT = NULL; \ | |
33 | _ELEM->_PREV = _TAIL; \ | |
34 | _TAIL->_NEXT = _ELEM; \ | |
35 | _TAIL = _ELEM; \ | |
36 | } \ | |
37 | } | |
38 | ||
39 | #define DLL_DELETE(_ELEM, _HEAD, _TAIL, _NEXT, _PREV) \ | |
40 | { \ | |
41 | if (_ELEM->_NEXT == NULL) { \ | |
42 | _TAIL = _ELEM->_PREV; \ | |
43 | } else { \ | |
44 | _ELEM->_NEXT->_PREV = _ELEM->_PREV; \ | |
45 | } \ | |
46 | if (_ELEM->_PREV == NULL) { \ | |
47 | _HEAD = _ELEM->_NEXT; \ | |
48 | } else { \ | |
49 | _ELEM->_PREV->_NEXT = _ELEM->_NEXT; \ | |
50 | } \ | |
51 | _ELEM->_NEXT = NULL; \ | |
52 | _ELEM->_PREV = NULL; \ | |
53 | } | |
54 | ||
55 | extern struct afsconf_dir *afs_cdir; | |
56 | extern char afs_LclCellName[64]; | |
57 | ||
58 | extern int afs_osicred_Initialized; | |
59 | ||
60 | extern void uafs_InitThread(void); | |
61 | extern int uafs_Setup(const char *mount); | |
62 | extern int uafs_ParseArgs(int argc, char **argv); | |
63 | extern int uafs_Run(void); | |
64 | extern const char* uafs_MountDir(void); | |
65 | extern void uafs_RxServerProc(void); | |
66 | extern int uafs_LookupLink(struct usr_vnode *vp, struct usr_vnode *parentP, | |
67 | struct usr_vnode **vpp); | |
68 | extern int uafs_LookupName(char *path, struct usr_vnode *parentP, | |
69 | struct usr_vnode **vpp, int follow, | |
70 | int no_eval_mtpt); | |
71 | extern int uafs_LookupParent(char *path, struct usr_vnode **vpp); | |
72 | extern int uafs_GetAttr(struct usr_vnode *vp, struct stat *stats); | |
73 | ||
74 | extern int uafs_SetTokens(char *buf, int len); | |
75 | extern int uafs_mkdir(char *path, int mode); | |
76 | extern int uafs_mkdir_r(char *path, int mode); | |
77 | extern int uafs_chdir(char *path); | |
78 | extern int uafs_chdir_r(char *path); | |
79 | extern int uafs_open(char *path, int flags, int mode); | |
80 | extern int uafs_open_r(char *path, int flags, int mode); | |
81 | extern int uafs_creat(char *path, int mode); | |
82 | extern int uafs_creat_r(char *path, int mode); | |
83 | extern int uafs_write(int fd, char *buf, int len); | |
84 | extern int uafs_pwrite(int fd, char *buf, int len, off_t offset); | |
85 | extern int uafs_pwrite_r(int fd, char *buf, int len, off_t offset); | |
86 | extern int uafs_read(int fd, char *buf, int len); | |
87 | extern int uafs_pread(int fd, char *buf, int leni, off_t offset); | |
88 | extern int uafs_pread_r(int fd, char *buf, int len, off_t offset); | |
89 | extern int uafs_pread_nocache(int fd, char *buf, int leni, off_t offset); | |
90 | extern int uafs_pread_nocache_r(int fd, char *buf, int len, off_t offset); | |
91 | extern int uafs_fsync(int fd); | |
92 | extern int uafs_fsync_r(int fd); | |
93 | extern int uafs_close(int fd); | |
94 | extern int uafs_close_r(int fd); | |
95 | extern int uafs_stat(char *path, struct stat *stats); | |
96 | extern int uafs_stat_r(char *path, struct stat *stats); | |
97 | extern int uafs_lstat(char *path, struct stat *stats); | |
98 | extern int uafs_lstat_r(char *path, struct stat *stats); | |
99 | extern int uafs_fstat(int fd, struct stat *stats); | |
100 | extern int uafs_fstat_r(int fd, struct stat *stats); | |
101 | extern int uafs_truncate(char *path, int len); | |
102 | extern int uafs_truncate_r(char *path, int len); | |
103 | extern int uafs_ftruncate(int fd, int len); | |
104 | extern int uafs_ftruncate_r(int fd, int len); | |
105 | extern int uafs_lseek(int fd, int offset, int whence); | |
106 | extern int uafs_lseek_r(int fd, int offset, int whence); | |
107 | extern int uafs_chmod(char *path, int mode); | |
108 | extern int uafs_chmod_r(char *path, int mode); | |
109 | extern int uafs_fchmod(int fd, int mode); | |
110 | extern int uafs_fchmod_r(int fd, int mode); | |
111 | extern int uafs_symlink(char *target, char *source); | |
112 | extern int uafs_symlink_r(char *target, char *source); | |
113 | extern int uafs_unlink(char *path); | |
114 | extern int uafs_unlink_r(char *path); | |
115 | extern int uafs_rmdir(char *path); | |
116 | extern int uafs_rmdir_r(char *path); | |
117 | extern int uafs_readlink(char *path, char *buf, int len); | |
118 | extern int uafs_readlink_r(char *path, char *buf, int len); | |
119 | extern int uafs_link(char *existing, char *newfile); | |
120 | extern int uafs_link_r(char *existing, char *newfile); | |
121 | extern int uafs_rename(char *old, char *newfile); | |
122 | extern int uafs_rename_r(char *old, char *newfile); | |
123 | extern int uafs_FlushFile(char *path); | |
124 | extern int uafs_FlushFile_r(char *path); | |
125 | extern usr_DIR *uafs_opendir(char *path); | |
126 | extern usr_DIR *uafs_opendir_r(char *path); | |
127 | extern struct usr_dirent *uafs_readdir(usr_DIR * dirp); | |
128 | extern struct usr_dirent *uafs_readdir_r(usr_DIR * dirp); | |
129 | extern int uafs_getdents(int fd, struct min_direct *buf, int len); | |
130 | extern int uafs_getdents_r(int fd, struct min_direct *buf, int len); | |
131 | extern int uafs_closedir(usr_DIR * dirp); | |
132 | extern int uafs_closedir_r(usr_DIR * dirp); | |
133 | extern int uafs_unlog(void); | |
134 | extern int uafs_unlog_r(void); | |
135 | extern void uafs_SetRxPort(int); | |
136 | extern char *uafs_afsPathName(char *); | |
137 | extern int uafs_RPCStatsEnableProc(void); | |
138 | extern int uafs_RPCStatsDisableProc(void); | |
139 | extern int uafs_RPCStatsEnablePeer(void); | |
140 | extern int uafs_RPCStatsDisablePeer(void); | |
141 | extern int uafs_IsRoot(char *path); | |
142 | extern int uafs_statmountpoint_r(char *path); | |
143 | extern int uafs_statvfs(struct statvfs *buf); | |
144 | extern void uafs_Shutdown(void); | |
145 | extern void uafs_mount(void); | |
146 | extern void uafs_setMountDir(const char *dir); | |
147 | extern int uafs_access(char *path, int amode); | |
148 | ||
149 | #endif /* __AFS_USROPS_H__ */ |