17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*8d490e6bSRameshkumar Ramasamy * Common Development and Distribution License (the "License"). 6*8d490e6bSRameshkumar Ramasamy * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21*8d490e6bSRameshkumar Ramasamy 227c478bd9Sstevel@tonic-gate /* 23*8d490e6bSRameshkumar Ramasamy * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _SYS_FS_UDF_VOLUME_H 287c478bd9Sstevel@tonic-gate #define _SYS_FS_UDF_VOLUME_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #include <sys/isa_defs.h> 317c478bd9Sstevel@tonic-gate 327c478bd9Sstevel@tonic-gate #ifdef __cplusplus 337c478bd9Sstevel@tonic-gate extern "C" { 347c478bd9Sstevel@tonic-gate #endif 357c478bd9Sstevel@tonic-gate 36*8d490e6bSRameshkumar Ramasamy #define UDF_102 0x66 37*8d490e6bSRameshkumar Ramasamy #define UDF_150 0x96 38*8d490e6bSRameshkumar Ramasamy #define UDF_200 0xC8 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate /* fid_idlen include compression id */ 417c478bd9Sstevel@tonic-gate #define FID_LEN(fid) (((sizeof (struct file_id) + \ 427c478bd9Sstevel@tonic-gate SWAP_16((fid)->fid_iulen) + (fid)->fid_idlen - 2) + 3) & ~3) 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate /* 457c478bd9Sstevel@tonic-gate * #define ID_LEN(fid) \ 467c478bd9Sstevel@tonic-gate * (((SWAP_16((fid)->fid_iulen) + (fid)->fid_idlen - 2) + 3) & ~3) 477c478bd9Sstevel@tonic-gate */ 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate #define F_LEN (sizeof (struct file_id) - 2) 507c478bd9Sstevel@tonic-gate 517c478bd9Sstevel@tonic-gate #define UDF_DOMAIN_NAME "*OSTA UDF Compliant\0\0\0\0" 527c478bd9Sstevel@tonic-gate #define UDF_LV_INFO "*UDF LV Info\0\0\0\0\0\0\0\0\0\0\0\0" 537c478bd9Sstevel@tonic-gate #define UDF_FREEEASPACE "*UDF FreeEASpace\0\0\0\0\0\0\0\0" 547c478bd9Sstevel@tonic-gate #define UDF_FREEAEASPACE "*UDF FreeAppEASpace\0\0\0\0" 557c478bd9Sstevel@tonic-gate #define UDF_CGMS_INFO "*UDF DVD CGMS Info\0\0\0\0" 567c478bd9Sstevel@tonic-gate #define UDF_OS2_EA "*UDF OS/2 EA\0\0\0\0\0\0\0\0\0\0\0" 577c478bd9Sstevel@tonic-gate #define UDF_OS2_EA_LEN "*UDF OS/2 EALength\0\0\0\0\0\0" 587c478bd9Sstevel@tonic-gate #define UDF_MAC_VOLINFO "*UDF Mac VolumeInfo\0\0\0\0" 597c478bd9Sstevel@tonic-gate #define UDF_MAC_UNIQID "*UDF Mac UniqueIDTable\0" 607c478bd9Sstevel@tonic-gate #define UDF_MAC_RESFRK "*UDF Mac ResourceFork\0\0" 617c478bd9Sstevel@tonic-gate #define UDF_VIRT_PART "*UDF Virtual Partition\0" 627c478bd9Sstevel@tonic-gate #define UDF_SPAR_PART "*UDF Sparable Partition" 637c478bd9Sstevel@tonic-gate #define UDF_VAT "*UDF Virtual Alloc Tbl\0" 647c478bd9Sstevel@tonic-gate #define UDF_SPAR_TBL "*UDF Sparing Table\0\0\0\0\0" 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gate #if defined(_BIG_ENDIAN) 687c478bd9Sstevel@tonic-gate #define SWAP_16(a) (((ushort_t)((a) & 0xff) << 8) | \ 697c478bd9Sstevel@tonic-gate ((ushort_t)((a) & 0xff00) >> 8)) 707c478bd9Sstevel@tonic-gate #define SWAP_32(a) ((((a) & 0xff) << 24) | \ 717c478bd9Sstevel@tonic-gate (((a) & 0xff00) << 8) | \ 727c478bd9Sstevel@tonic-gate (((a) & 0xff0000) >> 8) | \ 737c478bd9Sstevel@tonic-gate (((a) & 0xff000000) >> 24)) 747c478bd9Sstevel@tonic-gate #define SWAP_64(a) ((((a) & 0xffULL) << 56) | \ 757c478bd9Sstevel@tonic-gate (((a) & 0xff00ULL) << 40) | \ 767c478bd9Sstevel@tonic-gate (((a) & 0xff0000ULL) << 24) | \ 777c478bd9Sstevel@tonic-gate (((a) & 0xff000000ULL) << 8) | \ 787c478bd9Sstevel@tonic-gate (((a) & 0xff00000000ULL) >> 8) | \ 797c478bd9Sstevel@tonic-gate (((a) & 0xff0000000000ULL) >> 24) | \ 807c478bd9Sstevel@tonic-gate (((a) & 0xff000000000000ULL) >> 40) | \ 817c478bd9Sstevel@tonic-gate (((a) & 0xff00000000000000ULL) >> 56)) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate #define GET_32(a) ((uint32_t)(*((uint8_t *)a)) | \ 847c478bd9Sstevel@tonic-gate (((uint32_t)(*(((uint8_t *)a) + 1))) << 8) | \ 857c478bd9Sstevel@tonic-gate (((uint32_t)(*(((uint8_t *)a) + 2))) << 16) | \ 867c478bd9Sstevel@tonic-gate (((uint32_t)(*(((uint8_t *)a) + 3))) << 24)) 877c478bd9Sstevel@tonic-gate #else 887c478bd9Sstevel@tonic-gate #define SWAP_16(a) (a) 897c478bd9Sstevel@tonic-gate #define SWAP_32(a) (a) 907c478bd9Sstevel@tonic-gate #define SWAP_64(a) (a) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gate #define GET_32(a) (*((uint32_t *)a)) 937c478bd9Sstevel@tonic-gate #endif /* _BIG_ENDIAN */ 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate #define BCD2HEX_16(a) (((a) & 0xf) + \ 977c478bd9Sstevel@tonic-gate (((ushort_t)((a) & 0xf0) >> 4) * 10) + \ 987c478bd9Sstevel@tonic-gate (((ushort_t)((a) & 0xf00) >> 8) * 100) + \ 997c478bd9Sstevel@tonic-gate (((ushort_t)((a) & 0xf000) >> 12) * 1000)) 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate #define HEX2BCD_16(a) ((((ushort_t)a) % 10) | \ 1027c478bd9Sstevel@tonic-gate (((ushort_t)((ushort_t)(a) / 10) % 10) << 4) | \ 1037c478bd9Sstevel@tonic-gate (((ushort_t)((ushort_t)(a) / 100) % 10) << 8) | \ 1047c478bd9Sstevel@tonic-gate (((ushort_t)((ushort_t)(a) / 1000) % 10) << 12)) 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate #define ANCHOR_VOL_DESC_LOC (256) 1077c478bd9Sstevel@tonic-gate #define ANCHOR_VOL_DESC_LEN 0x200 1087c478bd9Sstevel@tonic-gate 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate 1117c478bd9Sstevel@tonic-gate /* Basic data structures */ 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gate 1147c478bd9Sstevel@tonic-gate typedef char dstring_t; 1157c478bd9Sstevel@tonic-gate 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate /* 1187c478bd9Sstevel@tonic-gate * recorded at the start of the descriptor 1197c478bd9Sstevel@tonic-gate * used to distinguish between different 1207c478bd9Sstevel@tonic-gate * descriptors 1217c478bd9Sstevel@tonic-gate */ 1227c478bd9Sstevel@tonic-gate struct tag { 1237c478bd9Sstevel@tonic-gate uint16_t tag_id; /* 00 Tag Identifier */ 1247c478bd9Sstevel@tonic-gate uint16_t tag_desc_ver; /* 02 Descriptor Version */ 1257c478bd9Sstevel@tonic-gate uint8_t tag_cksum; /* 04 Tag Checksum */ 1267c478bd9Sstevel@tonic-gate uint8_t tag_res; /* 05 Reserved */ 1277c478bd9Sstevel@tonic-gate uint16_t tag_sno; /* 06 Tag Serial Number */ 1287c478bd9Sstevel@tonic-gate uint16_t tag_crc; /* 08 Descriptor CRC */ 1297c478bd9Sstevel@tonic-gate uint16_t tag_crc_len; /* 0A Descriptor CRC length */ 1307c478bd9Sstevel@tonic-gate uint32_t tag_loc; /* 0C Tag Location */ 1317c478bd9Sstevel@tonic-gate }; 1327c478bd9Sstevel@tonic-gate typedef struct tag tag_t; 1337c478bd9Sstevel@tonic-gate 1347c478bd9Sstevel@tonic-gate /* 1357c478bd9Sstevel@tonic-gate * descriptor tag id values 1367c478bd9Sstevel@tonic-gate */ 1377c478bd9Sstevel@tonic-gate 1387c478bd9Sstevel@tonic-gate #define UD_PRI_VOL_DESC 0x0001 1397c478bd9Sstevel@tonic-gate #define UD_ANCH_VOL_DESC 0x0002 1407c478bd9Sstevel@tonic-gate #define UD_VOL_DESC_PTR 0x0003 1417c478bd9Sstevel@tonic-gate #define UD_IMPL_USE_DESC 0x0004 1427c478bd9Sstevel@tonic-gate #define UD_PART_DESC 0x0005 1437c478bd9Sstevel@tonic-gate #define UD_LOG_VOL_DESC 0x0006 1447c478bd9Sstevel@tonic-gate #define UD_UNALL_SPA_DESC 0x0007 1457c478bd9Sstevel@tonic-gate #define UD_TERM_DESC 0x0008 1467c478bd9Sstevel@tonic-gate #define UD_LOG_VOL_INT 0x0009 1477c478bd9Sstevel@tonic-gate 1487c478bd9Sstevel@tonic-gate #define UD_FILE_SET_DESC 0x0100 1497c478bd9Sstevel@tonic-gate #define UD_FILE_ID_DESC 0x0101 1507c478bd9Sstevel@tonic-gate #define UD_ALLOC_EXT_DESC 0x0102 1517c478bd9Sstevel@tonic-gate #define UD_INDIRECT_ENT 0x0103 1527c478bd9Sstevel@tonic-gate #define UD_TERMINAL_ENT 0x0104 1537c478bd9Sstevel@tonic-gate #define UD_FILE_ENTRY 0x0105 1547c478bd9Sstevel@tonic-gate #define UD_EXT_ATTR_HDR 0x0106 1557c478bd9Sstevel@tonic-gate #define UD_UNALL_SPA_ENT 0x0107 1567c478bd9Sstevel@tonic-gate #define UD_SPA_BMAP_DESC 0x0108 1577c478bd9Sstevel@tonic-gate #define UD_PART_INT_DESC 0x0109 1587c478bd9Sstevel@tonic-gate #define UD_EXT_FILE_ENT 0x010A 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate 1617c478bd9Sstevel@tonic-gate 1627c478bd9Sstevel@tonic-gate 1637c478bd9Sstevel@tonic-gate /* 1647c478bd9Sstevel@tonic-gate * Character set's allowed in descriptor fields 1657c478bd9Sstevel@tonic-gate * shall be specified 1667c478bd9Sstevel@tonic-gate */ 1677c478bd9Sstevel@tonic-gate struct charspec { 1687c478bd9Sstevel@tonic-gate uint8_t cs_type; /* 00 Character Set Type */ 1697c478bd9Sstevel@tonic-gate char cs_info[63]; /* 01 Character Set Information */ 1707c478bd9Sstevel@tonic-gate }; 1717c478bd9Sstevel@tonic-gate typedef struct charspec charspec_t; 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate #define CS_TYPE0 0x00 1747c478bd9Sstevel@tonic-gate #define CS_TYPE1 0x01 1757c478bd9Sstevel@tonic-gate #define CS_TYPE2 0x02 1767c478bd9Sstevel@tonic-gate #define CS_TYPE3 0x03 1777c478bd9Sstevel@tonic-gate #define CS_TYPE4 0x04 1787c478bd9Sstevel@tonic-gate #define CS_TYPE5 0x05 1797c478bd9Sstevel@tonic-gate #define CS_TYPE6 0x06 1807c478bd9Sstevel@tonic-gate #define CS_TYPE7 0x07 1817c478bd9Sstevel@tonic-gate #define CS_TYPE8 0x08 1827c478bd9Sstevel@tonic-gate 1837c478bd9Sstevel@tonic-gate 1847c478bd9Sstevel@tonic-gate 1857c478bd9Sstevel@tonic-gate /* 1867c478bd9Sstevel@tonic-gate * Entity Identification 1877c478bd9Sstevel@tonic-gate */ 1887c478bd9Sstevel@tonic-gate struct regid { 1897c478bd9Sstevel@tonic-gate uint8_t reg_flags; /* 00 Flags */ 1907c478bd9Sstevel@tonic-gate char reg_id[23]; /* 01 Identifier */ 1917c478bd9Sstevel@tonic-gate char reg_ids[8]; /* 18 Identifier Suffix */ 1927c478bd9Sstevel@tonic-gate }; 1937c478bd9Sstevel@tonic-gate typedef struct regid regid_t; 1947c478bd9Sstevel@tonic-gate 1957c478bd9Sstevel@tonic-gate #define EI_FLAG_DIRTY 0x00 1967c478bd9Sstevel@tonic-gate #define EI_FLAG_PROT 0x01 1977c478bd9Sstevel@tonic-gate 1987c478bd9Sstevel@tonic-gate struct lb_addr { 1997c478bd9Sstevel@tonic-gate /* uint32_t lba_number; 00 Logical Block Number */ 2007c478bd9Sstevel@tonic-gate /* uint8_t lba_prn[2]; 04 Partition Reference Number */ 2017c478bd9Sstevel@tonic-gate char lba_aaa[6]; 2027c478bd9Sstevel@tonic-gate }; 2037c478bd9Sstevel@tonic-gate typedef struct lb_addr lb_addr_t; 2047c478bd9Sstevel@tonic-gate #define lba_number(x)(((x)->lba_aaa[0]) | \ 2057c478bd9Sstevel@tonic-gate ((x)->lba_aaa[1] << 8) | \ 2067c478bd9Sstevel@tonic-gate ((x)->lba_aaa[2] << 16) | \ 2077c478bd9Sstevel@tonic-gate ((x)->lba_aaa[3] << 24)) 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate #define lba_prn(x) ((x)->lba_aaa[4] | ((x)->lba_aaa[5] << 8)) 2107c478bd9Sstevel@tonic-gate 2117c478bd9Sstevel@tonic-gate 2127c478bd9Sstevel@tonic-gate /* 2137c478bd9Sstevel@tonic-gate * Extend Descriptor 2147c478bd9Sstevel@tonic-gate */ 2157c478bd9Sstevel@tonic-gate struct extent_ad { 2167c478bd9Sstevel@tonic-gate uint32_t ext_len; /* 00 Extent Length */ 2177c478bd9Sstevel@tonic-gate uint32_t ext_loc; /* 04 Extent Location */ 2187c478bd9Sstevel@tonic-gate }; 2197c478bd9Sstevel@tonic-gate typedef struct extent_ad extent_ad_t; 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate /* 2227c478bd9Sstevel@tonic-gate * Short Allocation Descriptor 2237c478bd9Sstevel@tonic-gate */ 2247c478bd9Sstevel@tonic-gate struct short_ad { 2257c478bd9Sstevel@tonic-gate uint32_t sad_ext_len; /* 00 Extent Length */ 2267c478bd9Sstevel@tonic-gate uint32_t sad_ext_loc; /* 04 extent Position */ 2277c478bd9Sstevel@tonic-gate }; 2287c478bd9Sstevel@tonic-gate typedef struct short_ad short_ad_t; 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gate /* 2317c478bd9Sstevel@tonic-gate * Long Allocation Descriptor 2327c478bd9Sstevel@tonic-gate */ 2337c478bd9Sstevel@tonic-gate struct long_ad { 2347c478bd9Sstevel@tonic-gate uint32_t lad_ext_len; /* 00 Extent Length */ 2357c478bd9Sstevel@tonic-gate uint32_t lad_ext_loc; /* 04 Extent Location */ 2367c478bd9Sstevel@tonic-gate uint16_t lad_ext_prn; /* 08 Extent part ref no */ 2377c478bd9Sstevel@tonic-gate /* lb_addr_t lad_ext_loc; 04 Extent Location */ 2387c478bd9Sstevel@tonic-gate char lad_iu[6]; /* 0A Implementation Use */ 2397c478bd9Sstevel@tonic-gate }; 2407c478bd9Sstevel@tonic-gate typedef struct long_ad long_ad_t; 2417c478bd9Sstevel@tonic-gate 2427c478bd9Sstevel@tonic-gate 2437c478bd9Sstevel@tonic-gate 2447c478bd9Sstevel@tonic-gate 2457c478bd9Sstevel@tonic-gate /* 2467c478bd9Sstevel@tonic-gate * Format to record date and time 2477c478bd9Sstevel@tonic-gate * If zero date & time is not specified 2487c478bd9Sstevel@tonic-gate */ 2497c478bd9Sstevel@tonic-gate struct tstamp { 2507c478bd9Sstevel@tonic-gate uint16_t ts_tzone; /* 00 Type and Time Zone */ 2517c478bd9Sstevel@tonic-gate uint16_t ts_year; /* 02 Year */ 2527c478bd9Sstevel@tonic-gate uint8_t ts_month; /* 04 Month */ 2537c478bd9Sstevel@tonic-gate uint8_t ts_day; /* 05 Day */ 2547c478bd9Sstevel@tonic-gate uint8_t ts_hour; /* 06 Hour */ 2557c478bd9Sstevel@tonic-gate uint8_t ts_min; /* 07 Minute */ 2567c478bd9Sstevel@tonic-gate uint8_t ts_sec; /* 08 Second */ 2577c478bd9Sstevel@tonic-gate uint8_t ts_csec; /* 09 Centi-seconds */ 2587c478bd9Sstevel@tonic-gate uint8_t ts_husec; /* 0A Hundreds of Micro sec's */ 2597c478bd9Sstevel@tonic-gate uint8_t ts_usec; /* 0B Micro-seconds */ 2607c478bd9Sstevel@tonic-gate }; 2617c478bd9Sstevel@tonic-gate typedef struct tstamp tstamp_t; 2627c478bd9Sstevel@tonic-gate 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate /* 2657c478bd9Sstevel@tonic-gate * ts_tzone 2667c478bd9Sstevel@tonic-gate */ 2677c478bd9Sstevel@tonic-gate #define TMODE 0xF000 2687c478bd9Sstevel@tonic-gate #define TSIGN 0x0800 2697c478bd9Sstevel@tonic-gate #define TOFFSET 0x07FF 2707c478bd9Sstevel@tonic-gate #define TINVALID (TSIGN|TOFFSET) 2717c478bd9Sstevel@tonic-gate 2727c478bd9Sstevel@tonic-gate 2737c478bd9Sstevel@tonic-gate /* 2747c478bd9Sstevel@tonic-gate * Format of the ICB tag which specifies 2757c478bd9Sstevel@tonic-gate * most of the infomation of the file 2767c478bd9Sstevel@tonic-gate */ 2777c478bd9Sstevel@tonic-gate struct icb_tag { 2787c478bd9Sstevel@tonic-gate uint32_t itag_prnde; /* 00 Prior Recorded No of Dir Entry */ 2797c478bd9Sstevel@tonic-gate uint16_t itag_strategy; /* 04 Strategy Type */ 2807c478bd9Sstevel@tonic-gate uint16_t itag_param; /* 06 Strategy parameter */ 2817c478bd9Sstevel@tonic-gate uint16_t itag_max_ent; /* 08 Maximum No of Entries */ 2827c478bd9Sstevel@tonic-gate uint8_t itag_rsvd; /* 0A Reserved */ 2837c478bd9Sstevel@tonic-gate uint8_t itag_ftype; /* 0B File Type */ 2847c478bd9Sstevel@tonic-gate /* lb_addr_t itag_lb_addr; 0C parent ICB Location */ 2857c478bd9Sstevel@tonic-gate uint32_t itag_lb_loc; /* 0C */ 2867c478bd9Sstevel@tonic-gate uint16_t itag_lb_prn; /* 10 */ 2877c478bd9Sstevel@tonic-gate uint16_t itag_flags; /* 12 Flags */ 2887c478bd9Sstevel@tonic-gate }; 2897c478bd9Sstevel@tonic-gate typedef struct icb_tag icb_tag_t; 2907c478bd9Sstevel@tonic-gate 2917c478bd9Sstevel@tonic-gate /* 2927c478bd9Sstevel@tonic-gate * Different strategy types for the file 2937c478bd9Sstevel@tonic-gate * For DVD_ROM we use onlt type4 2947c478bd9Sstevel@tonic-gate */ 2957c478bd9Sstevel@tonic-gate #define STRAT_TYPE1 0x0001 2967c478bd9Sstevel@tonic-gate #define STRAT_TYPE2 0x0002 2977c478bd9Sstevel@tonic-gate #define STRAT_TYPE3 0x0003 2987c478bd9Sstevel@tonic-gate #define STRAT_TYPE4 0x0004 2997c478bd9Sstevel@tonic-gate #define STRAT_TYPE4096 0x1000 3007c478bd9Sstevel@tonic-gate 3017c478bd9Sstevel@tonic-gate /* 3027c478bd9Sstevel@tonic-gate * File types 3037c478bd9Sstevel@tonic-gate */ 3047c478bd9Sstevel@tonic-gate #define FTYPE_UNALL_SPACE 0x01 3057c478bd9Sstevel@tonic-gate #define FTYPE_PART_INTEG 0x02 3067c478bd9Sstevel@tonic-gate #define FTYPE_INDIRECT 0x03 3077c478bd9Sstevel@tonic-gate #define FTYPE_DIRECTORY 0x04 3087c478bd9Sstevel@tonic-gate #define FTYPE_FILE 0x05 3097c478bd9Sstevel@tonic-gate #define FTYPE_BLOCK_DEV 0x06 3107c478bd9Sstevel@tonic-gate #define FTYPE_CHAR_DEV 0x07 3117c478bd9Sstevel@tonic-gate #define FTYPE_EAR 0x08 3127c478bd9Sstevel@tonic-gate #define FTYPE_FIFO 0x09 3137c478bd9Sstevel@tonic-gate #define FTYPE_C_ISSOCK 0x0A 3147c478bd9Sstevel@tonic-gate #define FTYPE_T_ENTRY 0x0B 3157c478bd9Sstevel@tonic-gate #define FTYPE_SYMLINK 0x0C 3167c478bd9Sstevel@tonic-gate 3177c478bd9Sstevel@tonic-gate /* 3187c478bd9Sstevel@tonic-gate * Flags 3197c478bd9Sstevel@tonic-gate */ 3207c478bd9Sstevel@tonic-gate #define ICB_FLAG_SHORT_AD 0x0000 3217c478bd9Sstevel@tonic-gate #define ICB_FLAG_LONG_AD 0x0001 3227c478bd9Sstevel@tonic-gate #define ICB_FLAG_EXT_AD 0x0002 3237c478bd9Sstevel@tonic-gate #define ICB_FLAG_ONE_AD 0x0003 3247c478bd9Sstevel@tonic-gate #define ICB_FLAG_SORTED 0x0008 3257c478bd9Sstevel@tonic-gate #define ICB_FLAG_NON_RELOC 0x0010 3267c478bd9Sstevel@tonic-gate #define ICB_FLAG_ARCHIVE 0x0020 3277c478bd9Sstevel@tonic-gate #define ICB_FLAG_SETUID 0x0040 3287c478bd9Sstevel@tonic-gate #define ICB_FLAG_SETGID 0x0080 3297c478bd9Sstevel@tonic-gate #define ICB_FLAG_STICKY 0x0100 3307c478bd9Sstevel@tonic-gate #define ICB_FLAG_CONTIG 0x0200 3317c478bd9Sstevel@tonic-gate #define ICB_FLAG_SYSTEM 0x0400 3327c478bd9Sstevel@tonic-gate #define ICB_FLAG_TRNSFRMED 0x0800 3337c478bd9Sstevel@tonic-gate #define ICB_FLAG_MVERS 0x1000 3347c478bd9Sstevel@tonic-gate 3357c478bd9Sstevel@tonic-gate 3367c478bd9Sstevel@tonic-gate 3377c478bd9Sstevel@tonic-gate 3387c478bd9Sstevel@tonic-gate /* Volume recognition descriptors */ 3397c478bd9Sstevel@tonic-gate 3407c478bd9Sstevel@tonic-gate 3417c478bd9Sstevel@tonic-gate 3427c478bd9Sstevel@tonic-gate 3437c478bd9Sstevel@tonic-gate /* 3447c478bd9Sstevel@tonic-gate * Primary volume descriptor identifis the 3457c478bd9Sstevel@tonic-gate * volume and certain attributes of the volume 3467c478bd9Sstevel@tonic-gate */ 3477c478bd9Sstevel@tonic-gate struct pri_vol_desc { 3487c478bd9Sstevel@tonic-gate tag_t pvd_tag; /* 00 Descriptor Tag */ 3497c478bd9Sstevel@tonic-gate uint32_t pvd_vdsn; /* 10 Volume Descriptor Seq Num */ 3507c478bd9Sstevel@tonic-gate uint32_t pvd_pvdn; /* 14 Primary Vol Desc Num */ 3517c478bd9Sstevel@tonic-gate dstring_t pvd_vol_id[32]; /* 18 Volume Identifier */ 3527c478bd9Sstevel@tonic-gate uint16_t pvd_vsn; /* 38 Volume Sequence Num */ 3537c478bd9Sstevel@tonic-gate uint16_t pvd_mvsn; /* 3A Max Volume Sequence Num */ 3547c478bd9Sstevel@tonic-gate uint16_t pvd_il; /* 3C Interchange Level */ 3557c478bd9Sstevel@tonic-gate uint16_t pvd_mil; /* 3E Max Interchange Level */ 3567c478bd9Sstevel@tonic-gate uint32_t pvd_csl; /* 40 Character Set List */ 3577c478bd9Sstevel@tonic-gate uint32_t pvd_mcsl; /* 44 Max Character Set List */ 3587c478bd9Sstevel@tonic-gate dstring_t pvd_vsi[128]; /* 48 Volume Set Identifier */ 3597c478bd9Sstevel@tonic-gate charspec_t pvd_desc_cs; /* C8 Descriptor Character Set */ 3607c478bd9Sstevel@tonic-gate charspec_t pvd_exp_cs; /* 108 Explanatory Char Set */ 3617c478bd9Sstevel@tonic-gate extent_ad_t pvd_vol_abs; /* 148 Volume Abstract */ 3627c478bd9Sstevel@tonic-gate extent_ad_t pvd_vcn; /* 150 Volume Copyright Notice */ 3637c478bd9Sstevel@tonic-gate regid_t pvd_appl_id; /* 158 Application Identifier */ 3647c478bd9Sstevel@tonic-gate tstamp_t pvd_time; /* 178 Recording Data & Time */ 3657c478bd9Sstevel@tonic-gate regid_t pvd_ii; /* 184 Implementation Identifier */ 3667c478bd9Sstevel@tonic-gate char pvd_iu[64]; /* 1A4 Implementation Use */ 3677c478bd9Sstevel@tonic-gate uint32_t pvd_pvdsl; /* 1E4 Pred Vol Desc Seq Loc */ 3687c478bd9Sstevel@tonic-gate uint16_t pvd_flags; /* 1E8 Flags */ 3697c478bd9Sstevel@tonic-gate uint8_t pvd_res[22]; /* 1EA Reserved */ 3707c478bd9Sstevel@tonic-gate }; 3717c478bd9Sstevel@tonic-gate 3727c478bd9Sstevel@tonic-gate 3737c478bd9Sstevel@tonic-gate 3747c478bd9Sstevel@tonic-gate 3757c478bd9Sstevel@tonic-gate /* 3767c478bd9Sstevel@tonic-gate * Anchor Volume Descriptor Pointer specifies 3777c478bd9Sstevel@tonic-gate * the extent of Main & Reserve volume descriptor 3787c478bd9Sstevel@tonic-gate */ 3797c478bd9Sstevel@tonic-gate struct anch_vol_desc_ptr { 3807c478bd9Sstevel@tonic-gate tag_t avd_tag; /* 00 Descriptor Tag */ 3817c478bd9Sstevel@tonic-gate extent_ad_t avd_main_vdse; /* 10 Main Vol Desc Seq Extent */ 3827c478bd9Sstevel@tonic-gate extent_ad_t avd_res_vdse; /* 18 Reserve Vol Desc Seq Ext */ 3837c478bd9Sstevel@tonic-gate char avd_res[480]; /* 20 Reserved */ 3847c478bd9Sstevel@tonic-gate }; 3857c478bd9Sstevel@tonic-gate typedef struct anch_vol_desc_ptr anch_vol_desc_ptr_t; 3867c478bd9Sstevel@tonic-gate 3877c478bd9Sstevel@tonic-gate 3887c478bd9Sstevel@tonic-gate 3897c478bd9Sstevel@tonic-gate 3907c478bd9Sstevel@tonic-gate /* 3917c478bd9Sstevel@tonic-gate * Volume Descriptor Pointer 3927c478bd9Sstevel@tonic-gate */ 3937c478bd9Sstevel@tonic-gate struct vol_desc_ptr { 3947c478bd9Sstevel@tonic-gate tag_t vdp_tag; /* 00 Descriptor Tag */ 3957c478bd9Sstevel@tonic-gate uint32_t vdp_vdsn; /* 10 Volume Descriptor Seq Num */ 3967c478bd9Sstevel@tonic-gate extent_ad_t vdp_nvdse; /* 14 Next Vol Desc Seq Extent */ 3977c478bd9Sstevel@tonic-gate uint8_t vdp_res[484]; /* 1A Reserved */ 3987c478bd9Sstevel@tonic-gate }; 3997c478bd9Sstevel@tonic-gate typedef struct vol_desc_ptr vol_desc_ptr_t; 4007c478bd9Sstevel@tonic-gate 4017c478bd9Sstevel@tonic-gate 4027c478bd9Sstevel@tonic-gate 4037c478bd9Sstevel@tonic-gate 4047c478bd9Sstevel@tonic-gate /* 4057c478bd9Sstevel@tonic-gate * Implementation Use Volume Descriptor 4067c478bd9Sstevel@tonic-gate * This is taken from udf1.02/1.50 documents 4077c478bd9Sstevel@tonic-gate * the fields after iuvd_ii are defined only 4087c478bd9Sstevel@tonic-gate * for the udf domain 4097c478bd9Sstevel@tonic-gate */ 4107c478bd9Sstevel@tonic-gate struct iuvd_desc { 4117c478bd9Sstevel@tonic-gate tag_t iuvd_tag; /* 00 Descriptor Tag */ 4127c478bd9Sstevel@tonic-gate uint32_t iuvd_vdsn; /* 10 Volume Desc Seq Num */ 4137c478bd9Sstevel@tonic-gate regid_t iuvd_ii; /* 14 Domain Identifier */ 4147c478bd9Sstevel@tonic-gate charspec_t iuvd_cset; /* 34 LVI Charset */ 4157c478bd9Sstevel@tonic-gate dstring_t iuvd_lvi[128]; /* 74 Logical Vol Identifier */ 4167c478bd9Sstevel@tonic-gate dstring_t iuvd_ifo1[36]; /* F4 LV Info1 */ 4177c478bd9Sstevel@tonic-gate dstring_t iuvd_ifo2[36]; /* 118 LV Info2 */ 4187c478bd9Sstevel@tonic-gate dstring_t iuvd_ifo3[36]; /* 13C LV Info3 */ 4197c478bd9Sstevel@tonic-gate regid_t iuvd_iid; /* 160 Implementation ID */ 4207c478bd9Sstevel@tonic-gate uint8_t iuvd_iu[128]; /* 180 Implementation Use */ 4217c478bd9Sstevel@tonic-gate }; 4227c478bd9Sstevel@tonic-gate typedef struct iuvd_desc iuvd_desc_t; 4237c478bd9Sstevel@tonic-gate 4247c478bd9Sstevel@tonic-gate 4257c478bd9Sstevel@tonic-gate 4267c478bd9Sstevel@tonic-gate 4277c478bd9Sstevel@tonic-gate 4287c478bd9Sstevel@tonic-gate /* 4297c478bd9Sstevel@tonic-gate * Partition Descriptor 4307c478bd9Sstevel@tonic-gate * specifies the size and location of the partition 4317c478bd9Sstevel@tonic-gate */ 4327c478bd9Sstevel@tonic-gate struct part_desc { 4337c478bd9Sstevel@tonic-gate tag_t pd_tag; /* 00 Descriptor Tag */ 4347c478bd9Sstevel@tonic-gate uint32_t pd_vdsn; /* 10 Volume Desc Seq Num */ 4357c478bd9Sstevel@tonic-gate uint16_t pd_pflags; /* 14 Partition Flags */ 4367c478bd9Sstevel@tonic-gate uint16_t pd_pnum; /* 16 partition Number */ 4377c478bd9Sstevel@tonic-gate regid_t pd_pcontents; /* 18 Partition Contents */ 4387c478bd9Sstevel@tonic-gate uint8_t pd_pc_use[128]; /* 38 Partition Contents Use */ 4397c478bd9Sstevel@tonic-gate uint32_t pd_acc_type; /* B8 Access Type */ 4407c478bd9Sstevel@tonic-gate uint32_t pd_part_start; /* BC Part Start Location */ 4417c478bd9Sstevel@tonic-gate uint32_t pd_part_length; /* C0 partition Length */ 4427c478bd9Sstevel@tonic-gate regid_t pd_ii; /* C4 Implementation Identifier */ 4437c478bd9Sstevel@tonic-gate uint8_t pd_iu[128]; /* E4 Implementation Use */ 4447c478bd9Sstevel@tonic-gate uint8_t pd_res[156]; /* 164 Reserved */ 4457c478bd9Sstevel@tonic-gate }; 4467c478bd9Sstevel@tonic-gate typedef struct part_desc part_desc_t; 4477c478bd9Sstevel@tonic-gate 4487c478bd9Sstevel@tonic-gate 4497c478bd9Sstevel@tonic-gate /* 4507c478bd9Sstevel@tonic-gate * pd_acc_type 4517c478bd9Sstevel@tonic-gate */ 4527c478bd9Sstevel@tonic-gate #define PART_ACC_RO 0x01 4537c478bd9Sstevel@tonic-gate #define PART_ACC_WO 0x02 4547c478bd9Sstevel@tonic-gate #define PART_ACC_RW 0x03 4557c478bd9Sstevel@tonic-gate #define PART_ACC_OW 0x04 4567c478bd9Sstevel@tonic-gate 4577c478bd9Sstevel@tonic-gate 4587c478bd9Sstevel@tonic-gate /* 4597c478bd9Sstevel@tonic-gate * Partition Header Descriptor 4607c478bd9Sstevel@tonic-gate * Overloads pd_pc_use 4617c478bd9Sstevel@tonic-gate */ 4627c478bd9Sstevel@tonic-gate struct phdr_desc { 4637c478bd9Sstevel@tonic-gate struct short_ad phdr_ust; /* Unallocated Space Table */ 4647c478bd9Sstevel@tonic-gate struct short_ad phdr_usb; /* Unallocated Space Bitmap */ 4657c478bd9Sstevel@tonic-gate struct short_ad phdr_it; /* Partition Integrity Table */ 4667c478bd9Sstevel@tonic-gate struct short_ad phdr_fst; /* Freed Space Table */ 4677c478bd9Sstevel@tonic-gate struct short_ad phdr_fsb; /* Freed Space Bitmap */ 4687c478bd9Sstevel@tonic-gate }; 4697c478bd9Sstevel@tonic-gate typedef struct phdr_desc phdr_desc_t; 4707c478bd9Sstevel@tonic-gate 4717c478bd9Sstevel@tonic-gate 4727c478bd9Sstevel@tonic-gate 4737c478bd9Sstevel@tonic-gate 4747c478bd9Sstevel@tonic-gate 4757c478bd9Sstevel@tonic-gate 4767c478bd9Sstevel@tonic-gate /* 4777c478bd9Sstevel@tonic-gate * Logical Volume Descriptor 4787c478bd9Sstevel@tonic-gate */ 4797c478bd9Sstevel@tonic-gate struct log_vol_desc { 4807c478bd9Sstevel@tonic-gate tag_t lvd_tag; /* 00 Descriptor Tag */ 4817c478bd9Sstevel@tonic-gate uint32_t lvd_vdsn; /* 10 Volume Desc Seq Num */ 4827c478bd9Sstevel@tonic-gate charspec_t lvd_desc_cs; /* 14 Descriptor Char Set */ 4837c478bd9Sstevel@tonic-gate dstring_t lvd_lvid[128]; /* 54 Logical Vol Identifier */ 4847c478bd9Sstevel@tonic-gate uint32_t lvd_log_bsize; /* D4 Logical Block Size */ 4857c478bd9Sstevel@tonic-gate regid_t lvd_dom_id; /* D8 Domain Identifier */ 4867c478bd9Sstevel@tonic-gate long_ad_t lvd_lvcu; /* F8 Logical Vol Contents Use */ 4877c478bd9Sstevel@tonic-gate uint32_t lvd_mtbl_len; /* 108 Map Table Length */ 4887c478bd9Sstevel@tonic-gate uint32_t lvd_num_pmaps; /* 10C Number of Partition Maps */ 4897c478bd9Sstevel@tonic-gate regid_t lvd_ii; /* 110 Implementation Identifier */ 4907c478bd9Sstevel@tonic-gate uint8_t lvd_iu[128]; /* 130 Implementation Use */ 4917c478bd9Sstevel@tonic-gate extent_ad_t lvd_int_seq_ext; /* 1B0 Integrity Sequence Extent */ 4927c478bd9Sstevel@tonic-gate uint8_t lvd_pmaps[72]; /* 1B8 Partition Maps */ 4937c478bd9Sstevel@tonic-gate }; 4947c478bd9Sstevel@tonic-gate typedef struct log_vol_desc log_vol_desc_t; 4957c478bd9Sstevel@tonic-gate 4967c478bd9Sstevel@tonic-gate 4977c478bd9Sstevel@tonic-gate 4987c478bd9Sstevel@tonic-gate 4997c478bd9Sstevel@tonic-gate 5007c478bd9Sstevel@tonic-gate /* 5017c478bd9Sstevel@tonic-gate * Unallocated Space Descriptor 5027c478bd9Sstevel@tonic-gate * Contains information about the space 5037c478bd9Sstevel@tonic-gate * that does not belong to any of the 5047c478bd9Sstevel@tonic-gate * partition 5057c478bd9Sstevel@tonic-gate */ 5067c478bd9Sstevel@tonic-gate struct unall_spc_desc { 5077c478bd9Sstevel@tonic-gate tag_t ua_tag; /* 00 Descriptor Tag */ 5087c478bd9Sstevel@tonic-gate uint32_t ua_vdsn; /* 10 Volume Desc Seq Num */ 5097c478bd9Sstevel@tonic-gate uint32_t ua_nad; /* 14 Number of Allocation Desc */ 5107c478bd9Sstevel@tonic-gate uint8_t ua_al_dsc[488]; /* 18 Allocation Desc */ 5117c478bd9Sstevel@tonic-gate }; 5127c478bd9Sstevel@tonic-gate typedef struct unall_spc_desc unall_spc_desc_t; 5137c478bd9Sstevel@tonic-gate 5147c478bd9Sstevel@tonic-gate 5157c478bd9Sstevel@tonic-gate 5167c478bd9Sstevel@tonic-gate 5177c478bd9Sstevel@tonic-gate /* 5187c478bd9Sstevel@tonic-gate * Terminating Descriptor 5197c478bd9Sstevel@tonic-gate * this will be the last in a Volume Descriptor Sequence 5207c478bd9Sstevel@tonic-gate */ 5217c478bd9Sstevel@tonic-gate struct term_desc { 5227c478bd9Sstevel@tonic-gate tag_t td_tag; /* 00 Descriptor Tag */ 5237c478bd9Sstevel@tonic-gate uint8_t td_res[496]; /* 10 Reserved */ 5247c478bd9Sstevel@tonic-gate }; 5257c478bd9Sstevel@tonic-gate typedef struct term_desc term_desc_t; 5267c478bd9Sstevel@tonic-gate 5277c478bd9Sstevel@tonic-gate 5287c478bd9Sstevel@tonic-gate /* 5297c478bd9Sstevel@tonic-gate * Logical Volume Header Descriptor 5307c478bd9Sstevel@tonic-gate * This will be overlaid on lvid_lvcu 5317c478bd9Sstevel@tonic-gate * and will contain the maximum value of 5327c478bd9Sstevel@tonic-gate * unique id on the media 5337c478bd9Sstevel@tonic-gate */ 5347c478bd9Sstevel@tonic-gate struct log_vol_hdr_desc { 5357c478bd9Sstevel@tonic-gate uint64_t lvhd_uniqid; /* 00 Unique Id */ 5367c478bd9Sstevel@tonic-gate uint8_t lvhd_pad[24]; /* 08 reserved */ 5377c478bd9Sstevel@tonic-gate }; 5387c478bd9Sstevel@tonic-gate typedef struct log_vol_hdr_desc log_vol_hdr_desc_t; 5397c478bd9Sstevel@tonic-gate 5407c478bd9Sstevel@tonic-gate /* 5417c478bd9Sstevel@tonic-gate * Logical Volume Integrity Sequence 5427c478bd9Sstevel@tonic-gate * This will contain the integrity of the 5437c478bd9Sstevel@tonic-gate * file system 5447c478bd9Sstevel@tonic-gate */ 5457c478bd9Sstevel@tonic-gate struct log_vol_int_desc { 5467c478bd9Sstevel@tonic-gate tag_t lvid_tag; /* 00 Descriptor Tag */ 5477c478bd9Sstevel@tonic-gate tstamp_t lvid_tstamp; /* 10 Recording Date and Time */ 5487c478bd9Sstevel@tonic-gate uint32_t lvid_int_type; /* 1C Integrity Type */ 5497c478bd9Sstevel@tonic-gate extent_ad_t lvid_nie; /* 20 Next Integrity Extent */ 5507c478bd9Sstevel@tonic-gate /* uint8_t lvid_lvcu[32]; */ 5517c478bd9Sstevel@tonic-gate log_vol_hdr_desc_t lvid_lvcu; /* 28 Logical Volume Contents Use */ 5527c478bd9Sstevel@tonic-gate uint32_t lvid_npart; /* 48 Number of Partitions */ 5537c478bd9Sstevel@tonic-gate uint32_t lvid_liu; /* 4C Length of Implementation Use */ 5547c478bd9Sstevel@tonic-gate uint32_t lvid_fst[2]; /* 50 Free Space Table */ 5557c478bd9Sstevel@tonic-gate /* Size Table */ 5567c478bd9Sstevel@tonic-gate /* Implementation Use */ 5577c478bd9Sstevel@tonic-gate }; 5587c478bd9Sstevel@tonic-gate typedef struct log_vol_int_desc log_vol_int_desc_t; 5597c478bd9Sstevel@tonic-gate 5607c478bd9Sstevel@tonic-gate #define lvid_uniqid lvid_lvcu.lvhd_uniqid 5617c478bd9Sstevel@tonic-gate 5627c478bd9Sstevel@tonic-gate 5637c478bd9Sstevel@tonic-gate #define LOG_VOL_OPEN_INT 0x00 5647c478bd9Sstevel@tonic-gate #define LOG_VOL_CLOSE_INT 0x01 5657c478bd9Sstevel@tonic-gate 5667c478bd9Sstevel@tonic-gate 5677c478bd9Sstevel@tonic-gate /* 5687c478bd9Sstevel@tonic-gate * Logical Volume integrity Implementation Use 5697c478bd9Sstevel@tonic-gate * This is defined in udf spec 5707c478bd9Sstevel@tonic-gate */ 5717c478bd9Sstevel@tonic-gate struct lvid_iu { 5727c478bd9Sstevel@tonic-gate regid_t lvidiu_regid; /* 00 Implementation ID */ 5737c478bd9Sstevel@tonic-gate uint32_t lvidiu_nfiles; /* 20 Number of Files */ 5747c478bd9Sstevel@tonic-gate uint32_t lvidiu_ndirs; /* 24 Number of Directories */ 5757c478bd9Sstevel@tonic-gate uint16_t lvidiu_mread; /* 28 Minimum UDF read revision */ 5767c478bd9Sstevel@tonic-gate uint16_t lvidiu_mwrite; /* 2A Minimum UDF write revision */ 5777c478bd9Sstevel@tonic-gate uint16_t lvidiu_maxwr; /* 2C Maximum UDF write revision */ 5787c478bd9Sstevel@tonic-gate }; 5797c478bd9Sstevel@tonic-gate 5807c478bd9Sstevel@tonic-gate 5817c478bd9Sstevel@tonic-gate 5827c478bd9Sstevel@tonic-gate 5837c478bd9Sstevel@tonic-gate 5847c478bd9Sstevel@tonic-gate 5857c478bd9Sstevel@tonic-gate 5867c478bd9Sstevel@tonic-gate /* 5877c478bd9Sstevel@tonic-gate * File Set Descriptor 5887c478bd9Sstevel@tonic-gate * This will point to the root directory. 5897c478bd9Sstevel@tonic-gate */ 5907c478bd9Sstevel@tonic-gate struct file_set_desc { 5917c478bd9Sstevel@tonic-gate tag_t fsd_tag; /* 00 Descriptor Tag */ 5927c478bd9Sstevel@tonic-gate tstamp_t fsd_time; /* 10 Recording Date and Time */ 5937c478bd9Sstevel@tonic-gate uint16_t fsd_ilevel; /* 1C Interchange Level */ 5947c478bd9Sstevel@tonic-gate uint16_t fsd_mi_level; /* 1E Max Interchange Level */ 5957c478bd9Sstevel@tonic-gate uint32_t fsd_cs_list; /* 20 Character Set List */ 5967c478bd9Sstevel@tonic-gate uint32_t fsd_mcs_list; /* 24 Max Character Set List */ 5977c478bd9Sstevel@tonic-gate uint32_t fsd_fs_no; /* 28 File Set Number */ 5987c478bd9Sstevel@tonic-gate uint32_t fsd_fsd_no; /* 2C File Set Desc Number */ 5997c478bd9Sstevel@tonic-gate charspec_t fsd_lvidcs; /* 30 Log Vol Id Char Set */ 6007c478bd9Sstevel@tonic-gate char fsd_lvid[128]; /* 70 Log Vol Identifier */ 6017c478bd9Sstevel@tonic-gate charspec_t fsd_fscs; /* F0 File Set Character Set */ 6027c478bd9Sstevel@tonic-gate char fsd_fsi[32]; /* 130 File Set Identifier */ 6037c478bd9Sstevel@tonic-gate char fsd_cfi[32]; /* 150 Copyright File Identifier */ 6047c478bd9Sstevel@tonic-gate char fsd_afi[32]; /* 170 Abstract File identifier */ 6057c478bd9Sstevel@tonic-gate long_ad_t fsd_root_icb; /* 190 Root Directory ICB */ 6067c478bd9Sstevel@tonic-gate regid_t fsd_did; /* 1A0 Domain Identifier */ 6077c478bd9Sstevel@tonic-gate long_ad_t fsd_next; /* 1C0 Next Extent */ 6087c478bd9Sstevel@tonic-gate uint8_t fsd_res[48]; /* 1D0 Reserved */ 6097c478bd9Sstevel@tonic-gate }; 6107c478bd9Sstevel@tonic-gate typedef struct file_set_desc file_set_desc_t; 6117c478bd9Sstevel@tonic-gate 6127c478bd9Sstevel@tonic-gate 6137c478bd9Sstevel@tonic-gate 6147c478bd9Sstevel@tonic-gate 6157c478bd9Sstevel@tonic-gate 6167c478bd9Sstevel@tonic-gate 6177c478bd9Sstevel@tonic-gate 6187c478bd9Sstevel@tonic-gate /* 6197c478bd9Sstevel@tonic-gate * File Identifier Descriptor 6207c478bd9Sstevel@tonic-gate * Directory entries 6217c478bd9Sstevel@tonic-gate */ 6227c478bd9Sstevel@tonic-gate struct file_id { 6237c478bd9Sstevel@tonic-gate tag_t fid_tag; /* 00 Descriptor Tag */ 6247c478bd9Sstevel@tonic-gate uint16_t fid_ver; /* 10 File Version Number */ 6257c478bd9Sstevel@tonic-gate uint8_t fid_flags; /* 12 File characteristics */ 6267c478bd9Sstevel@tonic-gate uint8_t fid_idlen; /* 13 Length File Identifier */ 6277c478bd9Sstevel@tonic-gate long_ad_t fid_icb; /* 14 ICB */ 6287c478bd9Sstevel@tonic-gate uint16_t fid_iulen; /* 24 Length of Implmentation use */ 6297c478bd9Sstevel@tonic-gate uint8_t fid_spec[2]; /* iulen for iu name and padding */ 6307c478bd9Sstevel@tonic-gate }; 6317c478bd9Sstevel@tonic-gate typedef struct file_id file_id_t; 6327c478bd9Sstevel@tonic-gate 6337c478bd9Sstevel@tonic-gate #define FID_EXIST 0x01 6347c478bd9Sstevel@tonic-gate #define FID_DIR 0x02 6357c478bd9Sstevel@tonic-gate #define FID_DELETED 0x04 6367c478bd9Sstevel@tonic-gate #define FID_PARENT 0x08 6377c478bd9Sstevel@tonic-gate 6387c478bd9Sstevel@tonic-gate 6397c478bd9Sstevel@tonic-gate 6407c478bd9Sstevel@tonic-gate 6417c478bd9Sstevel@tonic-gate 6427c478bd9Sstevel@tonic-gate 6437c478bd9Sstevel@tonic-gate 6447c478bd9Sstevel@tonic-gate /* 6457c478bd9Sstevel@tonic-gate * Allocation Extent Descriptor 6467c478bd9Sstevel@tonic-gate */ 6477c478bd9Sstevel@tonic-gate struct alloc_ext_desc { 6487c478bd9Sstevel@tonic-gate tag_t aed_tag; /* 00 Descriptor Tag */ 6497c478bd9Sstevel@tonic-gate uint32_t aed_rev_ael; /* 10 Previous Alloc Extent Location */ 6507c478bd9Sstevel@tonic-gate uint32_t aed_len_aed; /* 14 Length of Allocation Desc */ 6517c478bd9Sstevel@tonic-gate }; 6527c478bd9Sstevel@tonic-gate typedef struct alloc_ext_desc alloc_ext_desc_t; 6537c478bd9Sstevel@tonic-gate 6547c478bd9Sstevel@tonic-gate 6557c478bd9Sstevel@tonic-gate 6567c478bd9Sstevel@tonic-gate 6577c478bd9Sstevel@tonic-gate 6587c478bd9Sstevel@tonic-gate /* 6597c478bd9Sstevel@tonic-gate * Indirect Entry 6607c478bd9Sstevel@tonic-gate * used to specify the address of another ICB 6617c478bd9Sstevel@tonic-gate */ 6627c478bd9Sstevel@tonic-gate struct indirect_entry { 6637c478bd9Sstevel@tonic-gate tag_t ie_tag; /* 00 Descriptor Tag */ 6647c478bd9Sstevel@tonic-gate icb_tag_t ie_icb_tag; /* 10 ICB tag */ 6657c478bd9Sstevel@tonic-gate long_ad_t ie_indirecticb; /* 24 Indirect ICB */ 6667c478bd9Sstevel@tonic-gate }; 6677c478bd9Sstevel@tonic-gate typedef struct indirect_entry indirect_entry_t; 6687c478bd9Sstevel@tonic-gate 6697c478bd9Sstevel@tonic-gate 6707c478bd9Sstevel@tonic-gate 6717c478bd9Sstevel@tonic-gate 6727c478bd9Sstevel@tonic-gate /* 6737c478bd9Sstevel@tonic-gate * Terminal Entry 6747c478bd9Sstevel@tonic-gate */ 6757c478bd9Sstevel@tonic-gate struct term_entry { 6767c478bd9Sstevel@tonic-gate tag_t te_tag; /* 00 Descriptor Tag */ 6777c478bd9Sstevel@tonic-gate icb_tag_t te_icb_tag; /* 10 ICB tag */ 6787c478bd9Sstevel@tonic-gate }; 6797c478bd9Sstevel@tonic-gate typedef struct term_entry term_entry_t; 6807c478bd9Sstevel@tonic-gate 6817c478bd9Sstevel@tonic-gate 6827c478bd9Sstevel@tonic-gate 6837c478bd9Sstevel@tonic-gate 6847c478bd9Sstevel@tonic-gate /* 6857c478bd9Sstevel@tonic-gate * File entry describes the 6867c478bd9Sstevel@tonic-gate * file attributes and location it is recorded on the media 6877c478bd9Sstevel@tonic-gate */ 6887c478bd9Sstevel@tonic-gate struct file_entry { 6897c478bd9Sstevel@tonic-gate tag_t fe_tag; /* 00 Descriptor Tag */ 6907c478bd9Sstevel@tonic-gate icb_tag_t fe_icb_tag; /* 10 ICB tag */ 6917c478bd9Sstevel@tonic-gate uint32_t fe_uid; /* 24 Uid */ 6927c478bd9Sstevel@tonic-gate uint32_t fe_gid; /* 28 Gid */ 6937c478bd9Sstevel@tonic-gate uint32_t fe_perms; /* 2C Permissions */ 6947c478bd9Sstevel@tonic-gate uint16_t fe_lcount; /* 30 File Link Count */ 6957c478bd9Sstevel@tonic-gate uint8_t fe_rec_for; /* 32 Record Format */ 6967c478bd9Sstevel@tonic-gate uint8_t fe_rec_dis; /* 33 Record Display Attributes */ 6977c478bd9Sstevel@tonic-gate uint32_t fe_rec_len; /* 34 Record Length */ 6987c478bd9Sstevel@tonic-gate uint64_t fe_info_len; /* 38 Information Length */ 6997c478bd9Sstevel@tonic-gate uint64_t fe_lbr; /* 40 Logical Blocks recorded */ 7007c478bd9Sstevel@tonic-gate tstamp_t fe_acc_time; /* 48 Access Data and Time */ 7017c478bd9Sstevel@tonic-gate tstamp_t fe_mod_time; /* 54 Modification Data and Time */ 7027c478bd9Sstevel@tonic-gate tstamp_t fe_attr_time; /* 60 Attribute Data and Time */ 7037c478bd9Sstevel@tonic-gate uint32_t fe_ckpoint; /* 6C Checkpoint */ 7047c478bd9Sstevel@tonic-gate long_ad_t fe_ea_icb; /* 70 Extended Attr ICB */ 7057c478bd9Sstevel@tonic-gate regid_t fe_impl_id; /* 80 Implementation Identifier */ 7067c478bd9Sstevel@tonic-gate uint64_t fe_uniq_id; /* A0 Unique Id */ 7077c478bd9Sstevel@tonic-gate uint32_t fe_len_ear; /* A8 Length of Extended Attr */ 7087c478bd9Sstevel@tonic-gate uint32_t fe_len_adesc; /* AC Length of Alloc Desc */ 7097c478bd9Sstevel@tonic-gate char fe_spec[336]; /* B0 used for EA and AD's */ 7107c478bd9Sstevel@tonic-gate }; 7117c478bd9Sstevel@tonic-gate typedef struct file_entry file_entry_t; 7127c478bd9Sstevel@tonic-gate 7137c478bd9Sstevel@tonic-gate 7147c478bd9Sstevel@tonic-gate 7157c478bd9Sstevel@tonic-gate 7167c478bd9Sstevel@tonic-gate 7177c478bd9Sstevel@tonic-gate /* 7187c478bd9Sstevel@tonic-gate * Extended Attribute Header 7197c478bd9Sstevel@tonic-gate */ 7207c478bd9Sstevel@tonic-gate struct ext_attr_hdr { 7217c478bd9Sstevel@tonic-gate tag_t eah_tag; /* 00 Descriptor Tag */ 7227c478bd9Sstevel@tonic-gate uint32_t eah_ial; /* 10 Implementation Attr Location */ 7237c478bd9Sstevel@tonic-gate uint32_t eah_aal; /* 14 Application Attr Location */ 7247c478bd9Sstevel@tonic-gate }; 7257c478bd9Sstevel@tonic-gate typedef struct ext_attr_hdr ext_attr_hdr_t; 7267c478bd9Sstevel@tonic-gate 7277c478bd9Sstevel@tonic-gate 7287c478bd9Sstevel@tonic-gate 7297c478bd9Sstevel@tonic-gate 7307c478bd9Sstevel@tonic-gate 7317c478bd9Sstevel@tonic-gate 7327c478bd9Sstevel@tonic-gate 7337c478bd9Sstevel@tonic-gate /* 7347c478bd9Sstevel@tonic-gate * Unallocated Space Entry 7357c478bd9Sstevel@tonic-gate */ 7367c478bd9Sstevel@tonic-gate struct unall_space_ent { 7377c478bd9Sstevel@tonic-gate tag_t use_tag; /* 00 Descriptor Tag */ 7387c478bd9Sstevel@tonic-gate icb_tag_t use_icb_tag; /* 10 ICB tag */ 7397c478bd9Sstevel@tonic-gate uint32_t use_len_ad; /* 24 Lenght of Allocation desc */ 7407c478bd9Sstevel@tonic-gate uint8_t use_ad[484]; /* 28 Allocation Descriptors */ 7417c478bd9Sstevel@tonic-gate }; 7427c478bd9Sstevel@tonic-gate typedef struct unall_space_ent unall_space_ent_t; 7437c478bd9Sstevel@tonic-gate 7447c478bd9Sstevel@tonic-gate 7457c478bd9Sstevel@tonic-gate 7467c478bd9Sstevel@tonic-gate 7477c478bd9Sstevel@tonic-gate 7487c478bd9Sstevel@tonic-gate /* 7497c478bd9Sstevel@tonic-gate * Space Bitmap Descriptor 7507c478bd9Sstevel@tonic-gate */ 7517c478bd9Sstevel@tonic-gate struct space_bmap_desc { 7527c478bd9Sstevel@tonic-gate tag_t sbd_tag; /* 00 Descriptor Tag */ 7537c478bd9Sstevel@tonic-gate uint32_t sbd_nbits; /* 10 Number of Bits */ 7547c478bd9Sstevel@tonic-gate uint32_t sbd_nbytes; /* 14 Number of Bytes */ 7557c478bd9Sstevel@tonic-gate uint8_t sbd_bmap[500]; /* 18 Bitmap */ 7567c478bd9Sstevel@tonic-gate }; 7577c478bd9Sstevel@tonic-gate typedef struct space_bmap_desc space_bmap_desc_t; 7587c478bd9Sstevel@tonic-gate 7597c478bd9Sstevel@tonic-gate 7607c478bd9Sstevel@tonic-gate 7617c478bd9Sstevel@tonic-gate 7627c478bd9Sstevel@tonic-gate 7637c478bd9Sstevel@tonic-gate /* 7647c478bd9Sstevel@tonic-gate * Partition Integrity entry 7657c478bd9Sstevel@tonic-gate */ 7667c478bd9Sstevel@tonic-gate struct part_int_desc { 7677c478bd9Sstevel@tonic-gate tag_t pid_tag; /* 00 Descriptor Tag */ 7687c478bd9Sstevel@tonic-gate icb_tag_t pid_idb_tag; /* 10 ICB tag */ 7697c478bd9Sstevel@tonic-gate tstamp_t pid_rtime; /* 24 Recording Data and Time */ 7707c478bd9Sstevel@tonic-gate uint8_t pid_integ; /* 30 Integrity type */ 7717c478bd9Sstevel@tonic-gate uint8_t pid_res[175]; /* 31 Reserved */ 7727c478bd9Sstevel@tonic-gate regid_t pid_ii; /* E0 Implementation Identifier */ 7737c478bd9Sstevel@tonic-gate uint8_t pid_iu[256]; /* 100 Implementation Use */ 7747c478bd9Sstevel@tonic-gate }; 7757c478bd9Sstevel@tonic-gate typedef struct part_int_desc part_int_desc_t; 7767c478bd9Sstevel@tonic-gate 7777c478bd9Sstevel@tonic-gate 7787c478bd9Sstevel@tonic-gate #define PART_OPEN_INT 0x00 7797c478bd9Sstevel@tonic-gate #define PART_CLOSE_INT 0x01 7807c478bd9Sstevel@tonic-gate #define PART_STABLE_INT 0x02 7817c478bd9Sstevel@tonic-gate 7827c478bd9Sstevel@tonic-gate 7837c478bd9Sstevel@tonic-gate 7847c478bd9Sstevel@tonic-gate 7857c478bd9Sstevel@tonic-gate struct attr_hdr { 7867c478bd9Sstevel@tonic-gate uint32_t ahdr_atype; /* Attribute Type */ 7877c478bd9Sstevel@tonic-gate uint8_t ahdr_astype; /* Attribute Subtype */ 7887c478bd9Sstevel@tonic-gate uint8_t ahdr_res[3]; /* Reserved */ 7897c478bd9Sstevel@tonic-gate uint32_t ahdr_length; /* Attribute Length */ 7907c478bd9Sstevel@tonic-gate uint8_t ahdr_data[4]; /* Attribute Data */ 7917c478bd9Sstevel@tonic-gate }; 7927c478bd9Sstevel@tonic-gate 7937c478bd9Sstevel@tonic-gate /* 7947c478bd9Sstevel@tonic-gate * We will support and use the 7957c478bd9Sstevel@tonic-gate * following Extended Attributes 7967c478bd9Sstevel@tonic-gate * we will ignore others while reading 7977c478bd9Sstevel@tonic-gate * and will preserve then when updating 7987c478bd9Sstevel@tonic-gate * the EAR's 7997c478bd9Sstevel@tonic-gate * In all the EA's we allocate the last member 8007c478bd9Sstevel@tonic-gate * as 4 bytes. This is a sort of hack 8017c478bd9Sstevel@tonic-gate * since the structure has to be 8027c478bd9Sstevel@tonic-gate * properly alined to 4 bytes. 8037c478bd9Sstevel@tonic-gate */ 8047c478bd9Sstevel@tonic-gate 8057c478bd9Sstevel@tonic-gate struct dev_spec_ear { 8067c478bd9Sstevel@tonic-gate uint32_t ds_atype; /* 00 Attribute Type */ 8077c478bd9Sstevel@tonic-gate uint8_t ds_astype; /* 04 Attribute Subtype */ 8087c478bd9Sstevel@tonic-gate uint8_t ds_res[3]; /* 05 Reserved */ 8097c478bd9Sstevel@tonic-gate uint32_t ds_attr_len; /* 08 Attrbute Length */ 8107c478bd9Sstevel@tonic-gate uint32_t ds_iu_len; /* 0C Impl Use Length */ 8117c478bd9Sstevel@tonic-gate uint32_t ds_major_id; /* 10 Major Device ID */ 8127c478bd9Sstevel@tonic-gate uint32_t ds_minor_id; /* 14 Minor Device ID */ 8137c478bd9Sstevel@tonic-gate uint8_t ds_iu[4]; /* 18 Implementation Use */ 8147c478bd9Sstevel@tonic-gate }; 8157c478bd9Sstevel@tonic-gate 8167c478bd9Sstevel@tonic-gate 8177c478bd9Sstevel@tonic-gate struct ftimes_ear { 8187c478bd9Sstevel@tonic-gate uint32_t ft_atype; /* 00 Attribute Type */ 8197c478bd9Sstevel@tonic-gate uint8_t ft_astype; /* 04 Attribute Subtype */ 8207c478bd9Sstevel@tonic-gate uint8_t ft_res[3]; /* 05 Reserved */ 8217c478bd9Sstevel@tonic-gate uint32_t ft_attr_len; /* 08 Attrbute Length */ 8227c478bd9Sstevel@tonic-gate uint32_t ft_data_len; /* 0C Data Length */ 8237c478bd9Sstevel@tonic-gate uint32_t ft_exist; /* 10 File Time Existence */ 8247c478bd9Sstevel@tonic-gate uint8_t ft_ft[4]; /* 14 File Times */ 8257c478bd9Sstevel@tonic-gate }; 8267c478bd9Sstevel@tonic-gate 8277c478bd9Sstevel@tonic-gate /* ft_exit */ 8287c478bd9Sstevel@tonic-gate #define FT_EXIST 0x0 8297c478bd9Sstevel@tonic-gate #define FT_DELETE 0x2 8307c478bd9Sstevel@tonic-gate #define FT_FEDT 0x3 8317c478bd9Sstevel@tonic-gate #define FT_BACKUP 0x5 8327c478bd9Sstevel@tonic-gate 8337c478bd9Sstevel@tonic-gate struct iu_ea { 8347c478bd9Sstevel@tonic-gate uint32_t iuea_atype; /* 00 Attribute Type */ 8357c478bd9Sstevel@tonic-gate uint8_t iuea_astype; /* 04 Attribute Subtype */ 8367c478bd9Sstevel@tonic-gate uint8_t iuea_res[3]; /* 05 Reserved */ 8377c478bd9Sstevel@tonic-gate uint32_t iuea_attr_len; /* 08 Attrbute Length */ 8387c478bd9Sstevel@tonic-gate uint32_t iuea_iu_len; /* 0C Implementation Use Length */ 8397c478bd9Sstevel@tonic-gate regid_t iuea_ii; /* 10 Implementation ID */ 8407c478bd9Sstevel@tonic-gate uint8_t iuea_iu[4]; /* 30 Impl Use */ 8417c478bd9Sstevel@tonic-gate }; 8427c478bd9Sstevel@tonic-gate 8437c478bd9Sstevel@tonic-gate 8447c478bd9Sstevel@tonic-gate /* 8457c478bd9Sstevel@tonic-gate * CGMS & FREE_SPACE will be 8467c478bd9Sstevel@tonic-gate * over laid on iu_iu field 8477c478bd9Sstevel@tonic-gate */ 8487c478bd9Sstevel@tonic-gate 8497c478bd9Sstevel@tonic-gate struct copy_mgt_info { 8507c478bd9Sstevel@tonic-gate uint16_t cgms_cksum; /* Header Checksum */ 8517c478bd9Sstevel@tonic-gate uint8_t cgms_info; /* CGMS Information */ 8527c478bd9Sstevel@tonic-gate uint8_t cgms_dstype; /* Data Structure Type */ 8537c478bd9Sstevel@tonic-gate uint32_t cgms_psi; /* Protection System Info */ 8547c478bd9Sstevel@tonic-gate }; 8557c478bd9Sstevel@tonic-gate 8567c478bd9Sstevel@tonic-gate #define COPY_PROTECTED 0x80 8577c478bd9Sstevel@tonic-gate 8587c478bd9Sstevel@tonic-gate struct FREE_SPACE { 8597c478bd9Sstevel@tonic-gate uint16_t fs_cksum; /* Header Checksum */ 8607c478bd9Sstevel@tonic-gate uint8_t fs_freesp[2]; /* Free EA space */ 8617c478bd9Sstevel@tonic-gate }; 8627c478bd9Sstevel@tonic-gate 8637c478bd9Sstevel@tonic-gate 8647c478bd9Sstevel@tonic-gate 8657c478bd9Sstevel@tonic-gate 8667c478bd9Sstevel@tonic-gate struct nsr_desc { 8677c478bd9Sstevel@tonic-gate uint8_t nsr_str_type; 8687c478bd9Sstevel@tonic-gate uint8_t nsr_id[5]; 8697c478bd9Sstevel@tonic-gate uint8_t nsr_ver; 8707c478bd9Sstevel@tonic-gate uint8_t nsr_res; 8717c478bd9Sstevel@tonic-gate uint8_t nsr_data[2040]; 8727c478bd9Sstevel@tonic-gate }; 8737c478bd9Sstevel@tonic-gate 8747c478bd9Sstevel@tonic-gate 8757c478bd9Sstevel@tonic-gate 8767c478bd9Sstevel@tonic-gate /* 8777c478bd9Sstevel@tonic-gate * Partition Map 8787c478bd9Sstevel@tonic-gate */ 8797c478bd9Sstevel@tonic-gate struct pmap_hdr { 8807c478bd9Sstevel@tonic-gate uint8_t maph_type; /* Partition Map Type */ 8817c478bd9Sstevel@tonic-gate uint8_t maph_length; /* Partition Map Length */ 8827c478bd9Sstevel@tonic-gate }; 8837c478bd9Sstevel@tonic-gate 8847c478bd9Sstevel@tonic-gate #define MAP_TYPE1 1 8857c478bd9Sstevel@tonic-gate #define MAP_TYPE2 2 8867c478bd9Sstevel@tonic-gate 8877c478bd9Sstevel@tonic-gate #define MAP_TYPE1_LEN 6 8887c478bd9Sstevel@tonic-gate #define MAP_TYPE2_LEN 64 8897c478bd9Sstevel@tonic-gate 8907c478bd9Sstevel@tonic-gate struct pmap_typ1 { 8917c478bd9Sstevel@tonic-gate uint8_t map1_type; /* Map type == 1 */ 8927c478bd9Sstevel@tonic-gate uint8_t map1_length; /* Map length == 6 */ 8937c478bd9Sstevel@tonic-gate uint16_t map1_vsn; /* Volume Sequence Number */ 8947c478bd9Sstevel@tonic-gate uint16_t map1_pn; /* Partition Number */ 8957c478bd9Sstevel@tonic-gate }; 8967c478bd9Sstevel@tonic-gate 8977c478bd9Sstevel@tonic-gate 8987c478bd9Sstevel@tonic-gate /* 8997c478bd9Sstevel@tonic-gate * Only two types of type2 maps 9007c478bd9Sstevel@tonic-gate * are supported they are 9017c478bd9Sstevel@tonic-gate * *UDF Virtual Partition 9027c478bd9Sstevel@tonic-gate * *UDF Sparable Partition 9037c478bd9Sstevel@tonic-gate * For vpm fields till map2_pn 9047c478bd9Sstevel@tonic-gate * are valid and the entire structure is 9057c478bd9Sstevel@tonic-gate * valid for spm 9067c478bd9Sstevel@tonic-gate */ 9077c478bd9Sstevel@tonic-gate struct pmap_typ2 { 9087c478bd9Sstevel@tonic-gate uint8_t map2_type; /* 00 Map type == 2 */ 9097c478bd9Sstevel@tonic-gate uint8_t map2_length; /* 01 Map length == 64 */ 9107c478bd9Sstevel@tonic-gate uint16_t map2_pad1; /* 02 Reserved */ 9117c478bd9Sstevel@tonic-gate regid_t map2_pti; /* 04 Entiry ID */ 9127c478bd9Sstevel@tonic-gate uint16_t map2_vsn; /* 24 Volume Sequence Number */ 9137c478bd9Sstevel@tonic-gate uint16_t map2_pn; /* 26 Partition Number */ 9147c478bd9Sstevel@tonic-gate uint16_t map2_pl; /* 28 Packet Length == 32 */ 9157c478bd9Sstevel@tonic-gate uint8_t map2_nst; /* 2A Number of sparing tables */ 9167c478bd9Sstevel@tonic-gate uint8_t map2_pad2; /* 2B Reserved */ 9177c478bd9Sstevel@tonic-gate uint32_t map2_sest; /* 2C Size of each sparing table */ 9187c478bd9Sstevel@tonic-gate uint32_t map2_st[4]; /* 30 sparing Tables */ 9197c478bd9Sstevel@tonic-gate }; 9207c478bd9Sstevel@tonic-gate 9217c478bd9Sstevel@tonic-gate 9227c478bd9Sstevel@tonic-gate struct stbl_entry { 9237c478bd9Sstevel@tonic-gate uint32_t sent_ol; /* Original Location */ 9247c478bd9Sstevel@tonic-gate uint32_t sent_ml; /* Mapped Location */ 9257c478bd9Sstevel@tonic-gate }; 9267c478bd9Sstevel@tonic-gate 9277c478bd9Sstevel@tonic-gate typedef struct stbl_entry stbl_entry_t; 9287c478bd9Sstevel@tonic-gate 9297c478bd9Sstevel@tonic-gate struct stbl { 9307c478bd9Sstevel@tonic-gate tag_t stbl_tag; /* 00 Tag */ 9317c478bd9Sstevel@tonic-gate regid_t stbl_si; /* 10 Sparing Identifier */ 9327c478bd9Sstevel@tonic-gate uint16_t stbl_len; /* 30 Reallocation Table Len */ 9337c478bd9Sstevel@tonic-gate uint16_t stbl_res1; /* 32 Reserved */ 9347c478bd9Sstevel@tonic-gate uint32_t stbl_seqno; /* 34 Sequence Number */ 9357c478bd9Sstevel@tonic-gate stbl_entry_t stbl_entry; /* 38 Sparing Table Entries */ 9367c478bd9Sstevel@tonic-gate }; 9377c478bd9Sstevel@tonic-gate 9387c478bd9Sstevel@tonic-gate struct path_comp { 9397c478bd9Sstevel@tonic-gate uint8_t pc_type; /* Component Type */ 9407c478bd9Sstevel@tonic-gate uint8_t pc_len; /* Length of Component ID */ 9417c478bd9Sstevel@tonic-gate uint16_t pc_ver; /* Component File Version Number */ 9427c478bd9Sstevel@tonic-gate uint8_t pc_id[4]; /* Component ID */ 9437c478bd9Sstevel@tonic-gate }; 9447c478bd9Sstevel@tonic-gate 9457c478bd9Sstevel@tonic-gate #ifdef __cplusplus 9467c478bd9Sstevel@tonic-gate } 9477c478bd9Sstevel@tonic-gate #endif 9487c478bd9Sstevel@tonic-gate 9497c478bd9Sstevel@tonic-gate #endif /* _SYS_FS_UDF_VOLUME_H */ 950