Solaris: Don't access lbolt directly
[openafs.git] / src / afs / SOLARIS / osi_inode.h
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 /*
11  * Inode information required for SOLARIS servers and salvager.
12  */
13 #ifndef _OSI_INODE_H_
14 #define _OSI_INODE_H_
15
16 #define BAD_IGET        -1000
17
18 #define VICEMAGIC       0x84fa1cb6
19
20 /* These exist because HP requires more work to extract uid. */
21 #define DI_VICEP3(p)    ( (p)->di_vicep3 )
22 #define I_VICE3(p)      ( (p)->i_vicep3 )
23
24 #define di_vicep1         di_un . di_icom .ic_gen
25 #define di_vicep2         di_un . di_icom .ic_flags
26 #if     defined(AFS_SUN56_ENV)
27 #define di_vicep3       di_ic.ic_uid
28 #define di_vicemagic    di_ic.ic_gid
29 #else
30 #define di_vicep3         di_un . di_icom .ic_size.val[0]
31 #endif
32
33 #define i_vicep1 i_ic.ic_gen
34 #define i_vicep2 i_ic.ic_flags
35 #if     defined(AFS_SUN56_ENV)
36 #define i_vicep3        i_ic.ic_uid
37 #define i_vicemagic     i_ic.ic_gid
38 #else
39 #define i_vicep3 i_ic.ic_size.val[0]
40 #endif
41
42 #if     defined(AFS_SUN56_ENV)
43 #define IS_VICEMAGIC(ip)        ((ip)->i_vicemagic == VICEMAGIC)
44 #define IS_DVICEMAGIC(dp)       ((dp)->di_vicemagic == VICEMAGIC)
45
46 #define CLEAR_VICEMAGIC(ip)     (ip)->i_vicemagic = (ip)->i_vicep3 = 0
47 #define CLEAR_DVICEMAGIC(dp)    (dp)->di_vicemagic = (dp)->di_vicep3 = 0
48 #else
49 #define  IS_VICEMAGIC(ip)        (((ip)->i_vicep2 || (ip)->i_vicep3) ? 1 : 0)
50 #define  IS_DVICEMAGIC(dp)       (((dp)->di_vicep2 || (dp)->di_vicep3) ? 1 : 0)
51
52 #define  CLEAR_VICEMAGIC(ip)     (ip)->i_vicep2 = (ip)->i_vicep3 = 0
53 #define  CLEAR_DVICEMAGIC(dp)    (dp)->di_vicep2 = (dp)->di_vicep3 = 0
54 #endif
55
56 #define AFS_SUN_UFS_CACHE 0
57 #ifdef AFS_HAVE_VXFS
58 #define AFS_SUN_VXFS_CACHE 1
59 #endif /* AFS_HAVE_VXFS */
60
61 #endif /* _OSI_INODE_H_ */