1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 23*0Sstevel@tonic-gate 24*0Sstevel@tonic-gate /* 25*0Sstevel@tonic-gate * High Sierra filesystem specification 26*0Sstevel@tonic-gate * Copyright (c) 1989 by Sun Microsystem, Inc. 27*0Sstevel@tonic-gate */ 28*0Sstevel@tonic-gate 29*0Sstevel@tonic-gate #ifndef _HSFS_SPEC_H_ 30*0Sstevel@tonic-gate #define _HSFS_SPEC_H_ 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #include <sys/isa_defs.h> /* for ENDIAN defines */ 33*0Sstevel@tonic-gate 34*0Sstevel@tonic-gate /* routines required for date parsing */ 35*0Sstevel@tonic-gate extern void hs_parse_dirdate(); /* parse date in directory */ 36*0Sstevel@tonic-gate extern void hs_parse_longdate(); /* parse date in volume id */ 37*0Sstevel@tonic-gate 38*0Sstevel@tonic-gate /* macros to parse binary integers */ 39*0Sstevel@tonic-gate #define ZERO(x) (u_int) (((u_char *)(x))[0]) 40*0Sstevel@tonic-gate #define ONE(x) (u_int) (((u_char *)(x))[1]) 41*0Sstevel@tonic-gate #define TWO(x) (u_int) (((u_char *)(x))[2]) 42*0Sstevel@tonic-gate #define THREE(x) (u_int) (((u_char *)(x))[3]) 43*0Sstevel@tonic-gate 44*0Sstevel@tonic-gate #define MSB_INT(x) \ 45*0Sstevel@tonic-gate ((((((ZERO(x) << 8) | ONE(x)) << 8) | TWO(x)) << 8) | THREE(x)) 46*0Sstevel@tonic-gate #define LSB_INT(x) \ 47*0Sstevel@tonic-gate ((((((THREE(x) << 8) | TWO(x)) << 8) | ONE(x)) << 8) | ZERO(x)) 48*0Sstevel@tonic-gate #define MSB_SHORT(x) ((ZERO(x) << 8) | ONE(x)) 49*0Sstevel@tonic-gate #define LSB_SHORT(x) ((ONE(x) << 8) | ZERO(x)) 50*0Sstevel@tonic-gate 51*0Sstevel@tonic-gate #if defined(_LITTLE_ENDIAN) 52*0Sstevel@tonic-gate #define BOTH_SHORT(x) (short) *((short *)x) 53*0Sstevel@tonic-gate #define BOTH_INT(x) (int) *((int *)x) 54*0Sstevel@tonic-gate #endif 55*0Sstevel@tonic-gate 56*0Sstevel@tonic-gate /* 57*0Sstevel@tonic-gate * The following describes actual on-disk structures. 58*0Sstevel@tonic-gate * To achieve portability, all structures are #defines 59*0Sstevel@tonic-gate * rather than a structure definition. Macros are provided 60*0Sstevel@tonic-gate * to get either the data or address of individual fields. 61*0Sstevel@tonic-gate */ 62*0Sstevel@tonic-gate 63*0Sstevel@tonic-gate /* Overall High Sierra disk structure */ 64*0Sstevel@tonic-gate #define HS_SECTOR_SIZE 2048 /* bytes per logical sector */ 65*0Sstevel@tonic-gate #define HS_SECTOR_SHIFT 11 /* sector<->byte shift count */ 66*0Sstevel@tonic-gate #define HS_SEC_PER_PAGE (PAGESIZE/HS_SECTOR_SIZE) /* sectors per page */ 67*0Sstevel@tonic-gate #define HS_SYSAREA_SEC 0 /* 1st sector of system area */ 68*0Sstevel@tonic-gate #define HS_VOLDESC_SEC 16 /* 1st sector of volume descriptors */ 69*0Sstevel@tonic-gate #define MAXHSOFFSET (HS_SECTOR_SIZE - 1) 70*0Sstevel@tonic-gate #define MAXHSMASK (~MAXHSOFFSET) 71*0Sstevel@tonic-gate 72*0Sstevel@tonic-gate /* Standard File Structure Volume Descriptor */ 73*0Sstevel@tonic-gate 74*0Sstevel@tonic-gate enum hs_voldesc_type { 75*0Sstevel@tonic-gate VD_BOOT=0, VD_SFS=1, VD_CCFS=2, VD_UNSPEC=3, VD_EOV=255 76*0Sstevel@tonic-gate }; 77*0Sstevel@tonic-gate #define HSV_ID_STRING "CDROM" /* HSV_std_id field */ 78*0Sstevel@tonic-gate #define HSV_ID_STRLEN 5 /* HSV_std_id field length */ 79*0Sstevel@tonic-gate #define HSV_ID_VER 1 /* HSV_std_ver field */ 80*0Sstevel@tonic-gate #define HSV_FILE_STRUCT_ID_VER 1 /* HSV_file_struct_ver field */ 81*0Sstevel@tonic-gate #define HSV_SYS_ID_STRLEN 32 /* HSV_sys_id field length */ 82*0Sstevel@tonic-gate #define HSV_VOL_ID_STRLEN 32 /* HSV_vol_id field length */ 83*0Sstevel@tonic-gate #define HSV_VOL_SET_ID_STRLEN 128 /* HSV_vol_set_id field length */ 84*0Sstevel@tonic-gate #define HSV_PUB_ID_STRLEN 128 /* HSV_pub_id field length */ 85*0Sstevel@tonic-gate #define HSV_PREP_ID_STRLEN 128 /* HSV_prep_id field length */ 86*0Sstevel@tonic-gate #define HSV_APPL_ID_STRLEN 128 /* HSV_appl_id field length */ 87*0Sstevel@tonic-gate #define HSV_COPYR_ID_STRLEN 32 /* HSV_copyr_id field length */ 88*0Sstevel@tonic-gate #define HSV_ABSTR_ID_STRLEN 32 /* HSV_abstr_id field length */ 89*0Sstevel@tonic-gate #define HSV_DATE_LEN 16 /* HSV date filed length */ 90*0Sstevel@tonic-gate 91*0Sstevel@tonic-gate /* macros to get the address of each field */ 92*0Sstevel@tonic-gate #define HSV_desc_lbn(x) (&((u_char *)x)[0]) 93*0Sstevel@tonic-gate #define HSV_desc_type(x) (&((u_char *)x)[8]) 94*0Sstevel@tonic-gate #define HSV_std_id(x) (&((u_char *)x)[9]) 95*0Sstevel@tonic-gate #define HSV_std_ver(x) (&((u_char *)x)[14]) 96*0Sstevel@tonic-gate #define HSV_sys_id(x) (&((u_char *)x)[16]) 97*0Sstevel@tonic-gate #define HSV_vol_id(x) (&((u_char *)x)[48]) 98*0Sstevel@tonic-gate #define HSV_vol_size(x) (&((u_char *)x)[88]) 99*0Sstevel@tonic-gate #define HSV_set_size(x) (&((u_char *)x)[128]) 100*0Sstevel@tonic-gate #define HSV_set_seq(x) (&((u_char *)x)[132]) 101*0Sstevel@tonic-gate #define HSV_blk_size(x) (&((u_char *)x)[136]) 102*0Sstevel@tonic-gate #define HSV_ptbl_size(x) (&((u_char *)x)[140]) 103*0Sstevel@tonic-gate #define HSV_ptbl_man_ls(x) (&((u_char *)x)[148]) 104*0Sstevel@tonic-gate #define HSV_ptbl_opt_ls1(x) (&((u_char *)x)[152]) 105*0Sstevel@tonic-gate #define HSV_ptbl_opt_ls2(x) (&((u_char *)x)[156]) 106*0Sstevel@tonic-gate #define HSV_ptbl_opt_ls3(x) (&((u_char *)x)[160]) 107*0Sstevel@tonic-gate #define HSV_ptbl_man_ms(x) (&((u_char *)x)[164]) 108*0Sstevel@tonic-gate #define HSV_ptbl_opt_ms1(x) (&((u_char *)x)[168]) 109*0Sstevel@tonic-gate #define HSV_ptbl_opt_ms2(x) (&((u_char *)x)[172]) 110*0Sstevel@tonic-gate #define HSV_ptbl_opt_ms3(x) (&((u_char *)x)[176]) 111*0Sstevel@tonic-gate #define HSV_root_dir(x) (&((u_char *)x)[180]) 112*0Sstevel@tonic-gate #define HSV_vol_set_id(x) (&((u_char *)x)[214]) 113*0Sstevel@tonic-gate #define HSV_pub_id(x) (&((u_char *)x)[342]) 114*0Sstevel@tonic-gate #define HSV_prep_id(x) (&((u_char *)x)[470]) 115*0Sstevel@tonic-gate #define HSV_appl_id(x) (&((u_char *)x)[598]) 116*0Sstevel@tonic-gate #define HSV_copyr_id(x) (&((u_char *)x)[726]) 117*0Sstevel@tonic-gate #define HSV_abstr_id(x) (&((u_char *)x)[758]) 118*0Sstevel@tonic-gate #define HSV_cre_date(x) (&((u_char *)x)[790]) 119*0Sstevel@tonic-gate #define HSV_mod_date(x) (&((u_char *)x)[806]) 120*0Sstevel@tonic-gate #define HSV_exp_date(x) (&((u_char *)x)[822]) 121*0Sstevel@tonic-gate #define HSV_eff_date(x) (&((u_char *)x)[838]) 122*0Sstevel@tonic-gate #define HSV_file_struct_ver(x) (&((u_char *)x)[854]) 123*0Sstevel@tonic-gate 124*0Sstevel@tonic-gate /* macros to get the values of each field (strings are returned as ptrs) */ 125*0Sstevel@tonic-gate #define HSV_DESC_LBN(x) BOTH_INT(HSV_desc_lbn(x)) 126*0Sstevel@tonic-gate #define HSV_DESC_TYPE(x) ((enum hs_voldesc_type)*(HSV_desc_type(x))) 127*0Sstevel@tonic-gate #define HSV_STD_ID(x) HSV_std_id(x) 128*0Sstevel@tonic-gate #define HSV_STD_VER(x) *(HSV_std_ver(x)) 129*0Sstevel@tonic-gate #define HSV_SYS_ID(x) HSV_sys_id(x) 130*0Sstevel@tonic-gate #define HSV_VOL_ID(x) HSV_vol_id(x) 131*0Sstevel@tonic-gate #define HSV_VOL_SIZE(x) BOTH_INT(HSV_vol_size(x)) 132*0Sstevel@tonic-gate #define HSV_SET_SIZE(x) BOTH_SHORT(HSV_set_size(x)) 133*0Sstevel@tonic-gate #define HSV_SET_SEQ(x) BOTH_SHORT(HSV_set_seq(x)) 134*0Sstevel@tonic-gate #define HSV_BLK_SIZE(x) BOTH_SHORT(HSV_blk_size(x)) 135*0Sstevel@tonic-gate #define HSV_PTBL_SIZE(x) BOTH_INT(HSV_ptbl_size(x)) 136*0Sstevel@tonic-gate #define HSV_PTBL_MAN_LS(x) LSB_INT(HSV_ptbl_man_ls(x)) 137*0Sstevel@tonic-gate #define HSV_PTBL_OPT_LS1(x) LSB_INT(HSV_ptbl_opt_ls1(x)) 138*0Sstevel@tonic-gate #define HSV_PTBL_OPT_LS2(x) LSB_INT(HSV_ptbl_opt_ls2(x)) 139*0Sstevel@tonic-gate #define HSV_PTBL_OPT_LS3(x) LSB_INT(HSV_ptbl_opt_ls3(x)) 140*0Sstevel@tonic-gate #define HSV_PTBL_MAN_MS(x) MSB_INT(HSV_ptbl_man_ms(x)) 141*0Sstevel@tonic-gate #define HSV_PTBL_OPT_MS1(x) MSB_INT(HSV_ptbl_opt_ms1(x)) 142*0Sstevel@tonic-gate #define HSV_PTBL_OPT_MS2(x) MSB_INT(HSV_ptbl_opt_ms2(x)) 143*0Sstevel@tonic-gate #define HSV_PTBL_OPT_MS3(x) MSB_INT(HSV_ptbl_opt_ms3(x)) 144*0Sstevel@tonic-gate #define HSV_ROOT_DIR(x) HSV_root_dir(x) 145*0Sstevel@tonic-gate #define HSV_VOL_SET_ID(x) HSV_vol_set_id(x) 146*0Sstevel@tonic-gate #define HSV_PUB_ID(x) HSV_pub_id(x) 147*0Sstevel@tonic-gate #define HSV_PREP_ID(x) HSV_prep_id(x) 148*0Sstevel@tonic-gate #define HSV_APPL_ID(x) HSV_appl_id(x) 149*0Sstevel@tonic-gate #define HSV_COPYR_ID(x) HSV_copyr_id(x) 150*0Sstevel@tonic-gate #define HSV_ABSTR_ID(x) HSV_abstr_id(x) 151*0Sstevel@tonic-gate #define HSV_CRE_DATE(x) HSV_cre_date(x) 152*0Sstevel@tonic-gate #define HSV_MOD_DATE(x) HSV_mod_date(x) 153*0Sstevel@tonic-gate #define HSV_EXP_DATE(x) HSV_exp_date(x) 154*0Sstevel@tonic-gate #define HSV_EFF_DATE(x) HSV_eff_date(x) 155*0Sstevel@tonic-gate #define HSV_FILE_STRUCT_VER(x) *(HSV_file_struct_ver(x)) 156*0Sstevel@tonic-gate 157*0Sstevel@tonic-gate /* Standard File Structure Volume Descriptor date fields */ 158*0Sstevel@tonic-gate #define HSV_DATE_2DIG(x) ( (((x)[0] - '0') * 10) + \ 159*0Sstevel@tonic-gate ((x)[1] - '0') ) 160*0Sstevel@tonic-gate #define HSV_DATE_4DIG(x) ( (((x)[0] - '0') * 1000) + \ 161*0Sstevel@tonic-gate (((x)[1] - '0') * 100) + \ 162*0Sstevel@tonic-gate (((x)[2] - '0') * 10) + \ 163*0Sstevel@tonic-gate ((x)[3] - '0') ) 164*0Sstevel@tonic-gate #define HSV_DATE_YEAR(x) HSV_DATE_4DIG(&((u_char *)x)[0]) 165*0Sstevel@tonic-gate #define HSV_DATE_MONTH(x) HSV_DATE_2DIG(&((u_char *)x)[4]) 166*0Sstevel@tonic-gate #define HSV_DATE_DAY(x) HSV_DATE_2DIG(&((u_char *)x)[6]) 167*0Sstevel@tonic-gate #define HSV_DATE_HOUR(x) HSV_DATE_2DIG(&((u_char *)x)[8]) 168*0Sstevel@tonic-gate #define HSV_DATE_MIN(x) HSV_DATE_2DIG(&((u_char *)x)[10]) 169*0Sstevel@tonic-gate #define HSV_DATE_SEC(x) HSV_DATE_2DIG(&((u_char *)x)[12]) 170*0Sstevel@tonic-gate #define HSV_DATE_HSEC(x) HSV_DATE_2DIG(&((u_char *)x)[14]) 171*0Sstevel@tonic-gate 172*0Sstevel@tonic-gate /* Path table enry */ 173*0Sstevel@tonic-gate /* fix size of path table entry */ 174*0Sstevel@tonic-gate #define HPE_FPESIZE 8 175*0Sstevel@tonic-gate /* macros to get the address of each field */ 176*0Sstevel@tonic-gate #define HPE_ext_lbn(x) (&((u_char *)x)[0]) 177*0Sstevel@tonic-gate #define HPE_xar_len(x) (&((u_char *)x)[4]) 178*0Sstevel@tonic-gate #define HPE_name_len(x) (&((u_char *)x)[5]) 179*0Sstevel@tonic-gate #define HPE_parent_no(x) (&((u_char *)x)[6]) 180*0Sstevel@tonic-gate #define HPE_name(x) (&((u_char *)x)[8]) 181*0Sstevel@tonic-gate 182*0Sstevel@tonic-gate /* macros to get the values of each field */ 183*0Sstevel@tonic-gate #if sun4 184*0Sstevel@tonic-gate #define HPE_EXT_LBN(x) (MSB_INT(HPE_ext_lbn(x))) 185*0Sstevel@tonic-gate #else 186*0Sstevel@tonic-gate #define HPE_EXT_LBN(x) *(int *)(HPE_ext_lbn(x)) 187*0Sstevel@tonic-gate #endif 188*0Sstevel@tonic-gate #define HPE_XAR_LEN(x) *(HPE_xar_len(x)) 189*0Sstevel@tonic-gate #define HPE_NAME_LEN(x) *(HPE_name_len(x)) 190*0Sstevel@tonic-gate #define HPE_PARENT_NO(x) *(short *)(HPE_parent_no(x)) 191*0Sstevel@tonic-gate #define HPE_NAME(x) HPE_name(x) 192*0Sstevel@tonic-gate 193*0Sstevel@tonic-gate /* root record */ 194*0Sstevel@tonic-gate #define HDE_ROOT_DIR_REC_SIZE 34 /* size of root directory record */ 195*0Sstevel@tonic-gate #define HDE_FDESIZE 33 /* fixed size for hsfs directory area */ 196*0Sstevel@tonic-gate #define HDE_FUSIZE 12 /* fixed size for unix areaa */ 197*0Sstevel@tonic-gate /* max size of a name */ 198*0Sstevel@tonic-gate #define HDE_MAX_NAME_LEN (255 - HDE_FDESIZE - HDE_FUSIZE) 199*0Sstevel@tonic-gate 200*0Sstevel@tonic-gate /* Directory Entry (Directory Record) */ 201*0Sstevel@tonic-gate 202*0Sstevel@tonic-gate #define UNIX_TO_HDE_DATE(t,p) parse_unixdate(t, p) /* return val at p */ 203*0Sstevel@tonic-gate 204*0Sstevel@tonic-gate /* macros to get the address of each field */ 205*0Sstevel@tonic-gate #define HDE_dir_len(x) (&((u_char *)x)[0]) 206*0Sstevel@tonic-gate #define HDE_xar_len(x) (&((u_char *)x)[1]) 207*0Sstevel@tonic-gate #define HDE_ext_lbn(x) (&((u_char *)x)[2]) 208*0Sstevel@tonic-gate #define HDE_ext_size(x) (&((u_char *)x)[10]) 209*0Sstevel@tonic-gate #define HDE_cdate(x) (&((u_char *)x)[18]) 210*0Sstevel@tonic-gate #define HDE_flags(x) (&((u_char *)x)[24]) 211*0Sstevel@tonic-gate #define HDE_reserved(x) (&((u_char *)x)[25]) 212*0Sstevel@tonic-gate #define HDE_intrlv_size(x) (&((u_char *)x)[26]) 213*0Sstevel@tonic-gate #define HDE_intrlv_skip(x) (&((u_char *)x)[27]) 214*0Sstevel@tonic-gate #define HDE_vol_set(x) (&((u_char *)x)[28]) 215*0Sstevel@tonic-gate #define HDE_name_len(x) (&((u_char *)x)[32]) 216*0Sstevel@tonic-gate #define HDE_name(x) (&((u_char *)x)[33]) 217*0Sstevel@tonic-gate 218*0Sstevel@tonic-gate /***UNIX extension****/ 219*0Sstevel@tonic-gate #define HDE_mode(x) (&((u_char *)x)[0]) 220*0Sstevel@tonic-gate #define HDE_uid(x) (&((u_char *)x)[4]) 221*0Sstevel@tonic-gate #define HDE_gid(x) (&((u_char *)x)[8]) 222*0Sstevel@tonic-gate 223*0Sstevel@tonic-gate /* macros to get the values of each field (strings are returned as ptrs) */ 224*0Sstevel@tonic-gate #define HDE_DIR_LEN(x) *(HDE_dir_len(x)) 225*0Sstevel@tonic-gate #define HDE_XAR_LEN(x) *(HDE_xar_len(x)) 226*0Sstevel@tonic-gate #define HDE_EXT_LBN(x) BOTH_INT(HDE_ext_lbn(x)) 227*0Sstevel@tonic-gate #define HDE_EXT_SIZE(x) BOTH_INT(HDE_ext_size(x)) 228*0Sstevel@tonic-gate #define HDE_CDATE(x) HDE_cdate(x) 229*0Sstevel@tonic-gate #define HDE_FLAGS(x) *(HDE_flags(x)) 230*0Sstevel@tonic-gate #define HDE_RESERVED(x) *(HDE_reserved(x)) 231*0Sstevel@tonic-gate #define HDE_INTRLV_SIZE(x) *(HDE_intrlv_size(x)) 232*0Sstevel@tonic-gate #define HDE_INTRLV_SKIP(x) *(HDE_intrlv_skip(x)) 233*0Sstevel@tonic-gate #define HDE_VOL_SET(x) BOTH_SHORT(HDE_vol_set(x)) 234*0Sstevel@tonic-gate #define HDE_NAME_LEN(x) *(HDE_name_len(x)) 235*0Sstevel@tonic-gate #define HDE_NAME(x) HDE_name(x) 236*0Sstevel@tonic-gate 237*0Sstevel@tonic-gate /***UNIX EXTENSION*****/ 238*0Sstevel@tonic-gate #define HDE_MODE(x) *(HDE_mode(x)) 239*0Sstevel@tonic-gate #define HDE_UID(x) *(HDE_uid(x)) 240*0Sstevel@tonic-gate #define HDE_GID(x) *(HDE_gid(x)) 241*0Sstevel@tonic-gate 242*0Sstevel@tonic-gate /* mask bits for HDE_FLAGS */ 243*0Sstevel@tonic-gate #define HDE_EXISTENCE 0x01 /* zero if file exists */ 244*0Sstevel@tonic-gate #define HDE_DIRECTORY 0x02 /* zero if file is not a directory */ 245*0Sstevel@tonic-gate #define HDE_ASSOCIATED 0x04 /* zero if file is not Associated */ 246*0Sstevel@tonic-gate #define HDE_RECORD 0x08 /* zero if no record attributes */ 247*0Sstevel@tonic-gate #define HDE_PROTECTION 0x10 /* zero if no protection attributes */ 248*0Sstevel@tonic-gate #define HDE_UNUSED_FLAGS 0x60 249*0Sstevel@tonic-gate #define HDE_LAST_EXTENT 0x80 /* zero if last extent in file */ 250*0Sstevel@tonic-gate #define HDE_PROHIBITED (HDE_DIRECTORY | HDE_ASSOCIATED | HDE_RECORD | \ 251*0Sstevel@tonic-gate HDE_LAST_EXTENT | HDE_UNUSED_FLAGS) 252*0Sstevel@tonic-gate 253*0Sstevel@tonic-gate /* Directory Record date fields */ 254*0Sstevel@tonic-gate #define HDE_DATE_YEAR(x) (((u_char *)x)[0] + 1900) 255*0Sstevel@tonic-gate #define HDE_DATE_MONTH(x) (((u_char *)x)[1]) 256*0Sstevel@tonic-gate #define HDE_DATE_DAY(x) (((u_char *)x)[2]) 257*0Sstevel@tonic-gate #define HDE_DATE_HOUR(x) (((u_char *)x)[3]) 258*0Sstevel@tonic-gate #define HDE_DATE_MIN(x) (((u_char *)x)[4]) 259*0Sstevel@tonic-gate #define HDE_DATE_SEC(x) (((u_char *)x)[5]) 260*0Sstevel@tonic-gate 261*0Sstevel@tonic-gate /* tests for Interchange Levels 1 & 2 file types */ 262*0Sstevel@tonic-gate #define HDE_REGULAR_FILE(x) (((x) & HDE_PROHIBITED) == 0) 263*0Sstevel@tonic-gate #define HDE_REGULAR_DIR(x) (((x) & HDE_PROHIBITED) == HDE_DIRECTORY) 264*0Sstevel@tonic-gate 265*0Sstevel@tonic-gate #define HS_DIR_NAMELEN 31 /* max length of a directory name */ 266*0Sstevel@tonic-gate #define HS_FILE_NAMELEN 31 /* max length of a filename */ 267*0Sstevel@tonic-gate 268*0Sstevel@tonic-gate #endif /*!_HSFS_SPEC_H_*/ 269