Commit | Line | Data |
---|---|---|
805e021f CE |
1 | #ifndef UKERNEL |
2 | /* This section for kernel libafs compiles only */ | |
3 | ||
4 | ||
5 | #ifndef AFS_PARAM_COMMON_H | |
6 | #define AFS_PARAM_COMMON_H | |
7 | ||
8 | #ifndef ASSEMBLER | |
9 | #include <sys/param.h> | |
10 | #endif | |
11 | ||
12 | #define AFS_XBSD_ENV 1 /* {Free,Open,Net}BSD */ | |
13 | ||
14 | #define AFS_NAMEI_ENV 1 /* User space interface to file system */ | |
15 | #define AFS_64BIT_IOPS_ENV 1 /* Needed for NAMEI */ | |
16 | #define AFS_NBSD_ENV 1 | |
17 | #define AFS_NBSD15_ENV 1 | |
18 | #undef AFS_NONFSTRANS | |
19 | #define AFS_NONFSTRANS 1 | |
20 | #define AFS_KERBEROS_ENV 1 | |
21 | #define FTRUNC O_TRUNC | |
22 | ||
23 | #define IUPD 0x0010 | |
24 | #define IACC 0x0020 | |
25 | #define ICHG 0x0040 | |
26 | #define IMOD 0x0080 | |
27 | ||
28 | #define IN_LOCK(ip) lockmgr(&ip->i_lock, LK_EXCLUSIVE, \ | |
29 | NULL, curproc) | |
30 | #define IN_UNLOCK(ip) lockmgr(&ip->i_lock, LK_RELEASE, \ | |
31 | NULL, curproc) | |
32 | ||
33 | #include <afs/afs_sysnames.h> | |
34 | ||
35 | #define AFS_VFS_ENV 1 | |
36 | #define AFS_VFSINCL_ENV 1 | |
37 | #define AFS_GREEDY43_ENV 1 | |
38 | #define AFS_ENV 1 | |
39 | ||
40 | #define AFS_MOUNT_AFS "afs" | |
41 | #define AFS_SYSCALL 210 | |
42 | ||
43 | ||
44 | #ifndef MOUNT_UFS | |
45 | #define MOUNT_UFS "ufs" | |
46 | #endif | |
47 | ||
48 | #ifndef MOUNT_AFS | |
49 | #define MOUNT_AFS AFS_MOUNT_AFS | |
50 | #endif | |
51 | ||
52 | #define AFS_HAVE_FFS 1 /* Use system's ffs. */ | |
53 | #define AFS_HAVE_STATVFS 0 /* System doesn't supports statvfs */ | |
54 | ||
55 | #define AFS_GCPAGS 0 /* if nonzero, garbage collect PAGs */ | |
56 | #define AFS_USE_GETTIMEOFDAY 1 /* use gettimeofday to implement rx clock */ | |
57 | ||
58 | /* Extra kernel definitions (from kdefs file) */ | |
59 | #ifdef _KERNEL | |
60 | #define AFS_GLOBAL_SUNLOCK 1 | |
61 | #define AFS_VFS34 1 /* What is VFS34??? */ | |
62 | #define afsio_iov uio_iov | |
63 | #define afsio_iovcnt uio_iovcnt | |
64 | #define afsio_offset uio_offset | |
65 | #define afsio_seg uio_segflg | |
66 | #define afsio_resid uio_resid | |
67 | #define AFS_UIOSYS UIO_SYSSPACE | |
68 | #define AFS_UIOUSER UIO_USERSPACE | |
69 | #define AFS_CLBYTES CLBYTES | |
70 | #define osi_GetTime(x) microtime(x) | |
71 | #define AFS_KALLOC(x) kalloc(x) | |
72 | #define AFS_KFREE(x,y) kfree(x,y) | |
73 | #define v_count v_usecount | |
74 | #define v_vfsp v_mount | |
75 | #define vfs_bsize mnt_stat.f_bsize | |
76 | #define vfs_fsid mnt_stat.f_fsid | |
77 | #define va_nodeid va_fileid | |
78 | #define vfs_vnodecovered mnt_vnodecovered | |
79 | #define direct dirent | |
80 | #define vnode_t struct vnode | |
81 | ||
82 | #ifndef MUTEX_DEFAULT | |
83 | #define MUTEX_DEFAULT 0 | |
84 | #endif /* MUTEX_DEFAULT */ | |
85 | ||
86 | #ifndef SSYS | |
87 | #define SSYS 0x00002 | |
88 | #endif /* SSYS */ | |
89 | ||
90 | #define p_rcred p_ucred | |
91 | ||
92 | #define VN_RELE(vp) vrele(((struct vnode *)(vp))) | |
93 | #define VN_HOLD(vp) VREF(((struct vnode *)(vp))) | |
94 | ||
95 | #if !defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) | |
96 | enum vcexcl { NONEXCL, EXCL }; | |
97 | ||
98 | #ifdef KERNEL | |
99 | #ifndef MIN | |
100 | #define MIN(A,B) ((A) < (B) ? (A) : (B)) | |
101 | #endif | |
102 | #ifndef MAX | |
103 | #define MAX(A,B) ((A) > (B) ? (A) : (B)) | |
104 | #endif | |
105 | #endif /* KERNEL */ | |
106 | ||
107 | #endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */ | |
108 | #endif /* _KERNEL */ | |
109 | ||
110 | #endif /* AFS_PARAM_COMMON_H */ | |
111 | ||
112 | #else /* !defined(UKERNEL) */ | |
113 | ||
114 | /* This section for user space compiles only */ | |
115 | ||
116 | ||
117 | #endif /* !defined(UKERNEL) */ |