OpenAFS
OpenAFS distributed network file system
/cygdrive/c/src/openafs/openafs.git/repo/src/afs/HPUX/osi_inode.h
00001 /*
00002  * Copyright 2000, International Business Machines Corporation and others.
00003  * All Rights Reserved.
00004  *
00005  * This software has been released under the terms of the IBM Public
00006  * License.  For details, see the LICENSE file in the top-level source
00007  * directory or online at http://www.openafs.org/dl/license10.html
00008  */
00009 
00010 /*
00011  * Inode information required for HPUX servers and salvager.
00012  */
00013 #ifndef _OSI_INODE_H_
00014 #define _OSI_INODE_H_
00015 
00016 #define BAD_IGET        -1000
00017 
00018 #define VICEMAGIC       0x84fa1cb6
00019 
00020 /* These exist because HP requires more work to extract uid. */
00021 #define DI_VICEP3(p)    ( *(int32_t *) &((p)->di_ic.ic_uid_msb) )
00022 #define I_VICE3(p)      ( *(int32_t *)( &((p)->i_icun.i_ic.ic_uid_msb) ) )
00023 
00024 #define _GET_DC_UID(DC) ((uid_t)((DC).ic_uid_msb << 16 | (DC).ic_uid_lsb))
00025 #define _GET_D_UID(DP)  _GET_DC_UID((DP)->di_ic)
00026 
00027 /* the VICEMAGIC field is moved to ic_flags. This is because VICEMAGIC
00028 ** happens to set the LARGEUID bit in the ic_flags field.  UFS interprets
00029 ** this as an inode which supports large uid's, hence does not do any UID
00030 ** length conversion on the fly. We use the uid fields to store i_vicep3.
00031 */
00032 #define i_vicemagic     i_icun.i_ic.ic_flags
00033 #define i_vicep1        i_icun.i_ic.ic_spare[0]
00034 #define i_vicep2        i_icun.i_ic.ic_spare[1]
00035 #define i_vicep4        i_icun.i_ic.ic_gen
00036 #define i_vicep3        ( *(int32_t *)( &(i_icun.i_ic.ic_uid_msb) ) )
00037 
00038 #define di_vicemagic     di_ic.ic_flags
00039 #define di_vicep1       di_ic.ic_spare[0]
00040 #define di_vicep2       di_ic.ic_spare[1]
00041 #define di_vicep4       di_ic.ic_gen
00042 #define di_vicep3       ( *(int32_t *)( &(di_ic.ic_uid_msb) ) )
00043 
00044 #define  IS_VICEMAGIC(ip)        ((ip)->i_vicemagic == VICEMAGIC ?  1 : 0)
00045 #define  IS_DVICEMAGIC(dp)       ((dp)->di_vicemagic == VICEMAGIC ?  1 : 0)
00046 
00047 #define  CLEAR_VICEMAGIC(ip)     (ip)->i_vicemagic = 0
00048 #define  CLEAR_DVICEMAGIC(dp)    (dp)->di_vicemagic = 0
00049 
00050 struct inode *igetinode(struct vfs *vfsp, dev_t dev, ino_t inode,
00051                         int *perror);
00052 
00053 #endif /* _OSI_INODE_H_ */
 All Data Structures Files Functions Variables