VirtualBox

Changeset 68385 in vbox


Ignore:
Timestamp:
Aug 11, 2017 10:25:14 AM (7 years ago)
Author:
vboxsync
Message:

iprt/formats/udf.h: More descriptor structures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/udf.h

    r68378 r68385  
    4545 */
    4646
     47/**
     48 * UDF d-character string (@ecma167{1,7.2.12,25}).
     49 *
     50 * This is mainly to mark what's d-strings and what's not.
     51 */
     52typedef char UDFDSTRING;
     53/** Pointer to an UDF dstring. */
     54typedef UDFDSTRING *PUDFDSTRING;
     55/** Pointer to a const UDF dstring. */
     56typedef UDFDSTRING const *PCUDFDSTRING;
    4757
    4858/**
     
    486496    uint32_t        uPrimaryVolumeDescNo;
    487497    /** 0x018: Volume identifier (dstring). */
    488     char            achVolumeID[32];
     498    UDFDSTRING      achVolumeID[32];
    489499    /** 0x038: Volume sequence number. */
    490500    uint16_t        uVolumeSeqNo;
     
    502512    /** 0x048: Volume set identifier (dstring).  This starts with 16 unique
    503513     *  characters, the first 8 being the hex represenation of a time value. */
    504     char            achVolumeSetID[128];
     514    UDFDSTRING      achVolumeSetID[128];
    505515    /** 0x0c8: Descriptor character set.
    506516     * For achVolumeSetID and achVolumeID. */
     
    606616        /** Generic view. */
    607617        uint8_t     ab[460];
    608         /** Logical volume information. */
     618        /** Logical volume information (@udf260{2.2.7.2,35}). */
    609619        struct
    610620        {
     
    612622            UDFCHARSPEC     Charset;
    613623            /** 0x074: Logical volume identifier. */
    614             char            achVolumeID[128];
     624            UDFDSTRING      achVolumeID[128];
    615625            /** 0x0f4: Info string \#1. */
    616             char            achInfo1[36];
     626            UDFDSTRING      achInfo1[36];
    617627            /** 0x118: Info string \#2. */
    618             char            achInfo2[36];
     628            UDFDSTRING      achInfo2[36];
    619629            /** 0x13c: Info string \#3. */
    620             char            achInfo3[36];
     630            UDFDSTRING      achInfo3[36];
    621631            /** 0x160: The implementation identifier
    622632             * (UDF_ENTITY_ID_IUVD_USE_IMPLEMENTATION). */
     
    731741
    732742/**
    733  * Logical volume descriptor (LVD).
     743 * Logical volume descriptor (LVD) (@ecma167{3,10.6,58}, @udf260{2.2.4,30}).
     744 *
     745 * @note Variable length.
    734746 */
    735747typedef struct UDFLOGICALVOLUMEDESC
    736748{
    737     /** 0x00: The descriptor tag (UDF_TAG_ID_LOGICAL_VOLUME_DESC). */
     749    /** 0x000: The descriptor tag (UDF_TAG_ID_LOGICAL_VOLUME_DESC). */
     750    UDFTAG          Tag;
     751    /** 0x010: Volume descriptor sequence number. */
     752    uint32_t        uVolumeDescSeqNo;
     753    /** 0x014: Character set used in the achLogicalVolumeID field.   */
     754    UDFCHARSPEC     DescriptorCharSet;
     755    /** 0x054: The logical volume ID (label). */
     756    UDFDSTRING      achLogicalVolumeID[128];
     757    /** 0x0d4: Logical block size (in bytes). */
     758    uint32_t        cbLogicalBlock;
     759    /** 0x0d8: Domain identifier (UDF_ENTITY_ID_LVD_DOMAIN). */
     760    UDFENTITYID     idDomain;
     761    /** 0x0f8: Logical volume contents use. */
     762    union
     763    {
     764        /** Byte view. */
     765        uint8_t     ab[16];
     766        /** The extent containing the file set descriptor. */
     767        UDFLONGAD   FileSetDescriptor;
     768    } ContentsUse;
     769    /** 0x108: Map table length (in bytes). */
     770    uint32_t        cbMapTable;
     771    /** 0x10c: Number of partition maps. */
     772    uint32_t        cPartitionMaps;
     773    /** 0x110: Implementation identifier (UDF_ENTITY_ID_LVD_IMPLEMENTATION). */
     774    UDFENTITYID     idImplementation;
     775    /** 0x130: Implementation use. */
     776    union
     777    {
     778        /** Byte view. */
     779        uint8_t     ab[128];
     780    } ImplementationUse;
     781    /** 0x1b0: Integrity sequence extent. Can be zero if cPartitionMaps is zero. */
     782    UDFEXTENTAD     IntegritySeqExtent;
     783    /** 0x1b8: Partition maps (length given by @a cPartitionMaps). */
     784    uint8_t         abPartitionMaps[RT_FLEXIBLE_ARRAY];
     785} UDFLOGICALVOLUMEDESC;
     786AssertCompileMemberOffset(UDFLOGICALVOLUMEDESC, abPartitionMaps, 0x1b8);
     787/** Pointer to an UDF logical volume descriptor. */
     788typedef UDFLOGICALVOLUMEDESC *PUDFLOGICALVOLUMEDESC;
     789/** Pointer to a const UDF logical volume descriptor. */
     790typedef UDFLOGICALVOLUMEDESC const *PCUDFLOGICALVOLUMEDESC;
     791
     792
     793/**
     794 * UDF unallocated space descriptor (USD) (@ecma167{3,10.8,61}, @udf260{2.2.5,32}).
     795 *
     796 * @note Variable length.
     797 */
     798typedef struct UDFUNALLOCATEDSPACEDESC
     799{
     800    /** 0x00: The descriptor tag (UDF_TAG_ID_UNALLOCATED_SPACE_DESC). */
    738801    UDFTAG          Tag;
    739802    /** 0x10: Volume descriptor sequence number. */
    740803    uint32_t        uVolumeDescSeqNo;
    741     /** 0x14: Character set used in the achLogicalVolumeID field.   */
    742     UDFCHARSPEC     DescriptorCharSet;
    743     /** 0x54: The logical volume ID (label). */
    744     char            achLogicalVolumeID[128];
    745 
    746     // continue here...
    747     // continue here...
    748     // continue here...
    749 
    750 } UDFLOGICALVOLUMEDESC;
    751 
    752 //#define UDF_TAG_ID_UNALLOCATED_SPACE_DESC           UINT16_C(0x0007)
    753 //#define UDF_TAG_ID_TERMINATING_DESC                 UINT16_C(0x0008)
    754 //#define UDF_TAG_ID_LOGICAL_VOLUME_INTEGRITY_DESC    UINT16_C(0x0009)
    755 
     804    /** 0x14: Number of allocation descriptors in the array below. */
     805    uint32_t        cAllocationDescriptors;
     806    /** 0x18: Allocation descriptors (variable length). */
     807    UDFEXTENTAD     aAllocationDescriptors[RT_FLEXIBLE_ARRAY];
     808} UDFUNALLOCATEDSPACEDESC;
     809AssertCompileMemberOffset(UDFUNALLOCATEDSPACEDESC, aAllocationDescriptors, 0x18);
     810/** Pointer to an UDF unallocated space descriptor. */
     811typedef UDFUNALLOCATEDSPACEDESC *PUDFUNALLOCATEDSPACEDESC;
     812/** Pointer to a const UDF unallocated space descriptor. */
     813typedef UDFUNALLOCATEDSPACEDESC const *PCUDFUNALLOCATEDSPACEDESC;
     814
     815
     816/**
     817 * UDF terminating descriptor (@ecma167{3,10.9,62}).
     818 */
     819typedef struct UDFTERMINATINGDESC
     820{
     821    /** 0x00: The descriptor tag (UDF_TAG_ID_TERMINATING_DESC). */
     822    UDFTAG          Tag;
     823    /** 0x10: Reserved, MBZ. */
     824    uint8_t         abReserved[496];
     825} UDFTERMINATINGDESC;
     826/** Pointer to an UDF terminating descriptor. */
     827typedef UDFTERMINATINGDESC *PUDFTERMINATINGDESC;
     828/** Pointer to a const UDF terminating descriptor. */
     829typedef UDFTERMINATINGDESC const *PCUDFTERMINATINGDESC;
     830
     831
     832/**
     833 * UDF logical volume integrity descriptor (LVID) (@ecma167{3,10.10,62},
     834 * @udf260{2.2.6,32}).
     835 */
     836typedef struct UDFLOGICALVOLINTEGRITYDESC
     837{
     838    /** 0x00: The descriptor tag (UDF_TAG_ID_TERMINATING_DESC). */
     839    UDFTAG          Tag;
     840    /** 0x10: Recording timestamp. */
     841    UDFTIMESTAMP    RecordingTimestamp;
     842    /** 0x1c: Integrity type (UDF_LVID_TYPE_XXX). */
     843    uint32_t        uIntegrityType;
     844    /** 0x20: The next integrity extent. */
     845    UDFEXTENTAD     NextIntegrityExtent;
     846    /** 0x28: Number of partitions. */
     847    uint32_t        cPartitions;
     848    /** 0x2c: Length of implementation use. */
     849    uint32_t        cbImplementationUse;
     850    /**
     851     * There are two tables each @a cPartitions in size.  The first is the free
     852     * space table.  The second the size table.
     853     *
     854     * Following these tables there are @a cbImplemenationUse bytes of space for
     855     * the implementation to use.
     856     */
     857    uint32_t        aTables[RT_FLEXIBLE_ARRAY];
     858} UDFLOGICALVOLINTEGRITYDESC;
     859AssertCompileMemberOffset(UDFLOGICALVOLINTEGRITYDESC, cbImplementationUse, 0x2c);
     860AssertCompileMemberOffset(UDFLOGICALVOLINTEGRITYDESC, aTables, 0x30);
     861/** Pointer to an UDF logical volume integrity descriptor.   */
     862typedef UDFLOGICALVOLINTEGRITYDESC *PUDFLOGICALVOLINTEGRITYDESC;
     863/** Pointer to a const UDF logical volume integrity descriptor.   */
     864typedef UDFLOGICALVOLINTEGRITYDESC const *PCUDFLOGICALVOLINTEGRITYDESC;
     865
     866/** @name UDF_LVID_TYPE_XXX - Integirty types.
     867 * @{ */
     868#define UDF_LVID_TYPE_OPEN          UINT32_C(0x00000000)
     869#define UDF_LVID_TYPE_CLOSE         UINT32_C(0x00000001)
     870/** @} */
    756871
    757872
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette