VirtualBox

Changeset 68920 in vbox for trunk/include/iprt/formats


Ignore:
Timestamp:
Sep 29, 2017 8:25:15 AM (7 years ago)
Author:
vboxsync
Message:

iprt: udf reading updates

File:
1 edited

Legend:

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

    r68687 r68920  
    346346 *
    347347 * @{ */
    348 /** Primary volume descriptor, implementation ID field.
    349  * Implementation ID suffix. */
    350 #define UDF_ENTITY_ID_PVD_IMPLEMENTATION        "*Developer ID"
    351 /** Primary volume descriptor, application ID field.
    352  * Application ID suffix. */
    353 #define UDF_ENTITY_ID_PVD_APPLICATION           "*Application ID"
    354 
    355348/** Implementation use volume descriptor, implementation ID field.
    356349 * UDF ID suffix. */
    357350#define UDF_ENTITY_ID_IUVD_IMPLEMENTATION       "*UDF LV Info"
    358 /** Implementation use volume descriptor, implementation ID field in Use field.
    359  * Implementation ID suffix. */
    360 #define UDF_ENTITY_ID_IUVD_USE_IMPLEMENTATION   "*Developer ID"
    361 
    362 /** Partition descriptor, implementation ID field.
    363  * Implementation ID suffix. */
    364 #define UDF_ENTITY_ID_PD_IMPLEMENTATION         "*Developer ID"
     351
    365352/** Partition descriptor, partition contents field, set to indicate UDF
    366353 * (ECMA-167 3rd edition). Application ID suffix. */
     
    376363#define UDF_ENTITY_ID_PD_PARTITION_CONTENTS_FAT     "+FDC01"
    377364
    378 /** Logical volume descriptor, implementation ID field.
    379  * Implementation ID suffix. */
    380 #define UDF_ENTITY_ID_LVD_IMPLEMENTATION        "*Developer ID"
    381365/** Logical volume descriptor, domain ID field.
    382366 * Domain ID suffix. */
     
    386370 * Domain ID suffix. */
    387371#define UDF_ENTITY_FSD_LVD_DOMAIN               "*OSTA UDF Compliant"
    388 
    389 /** File identifier descriptor, implementation use field.
    390  * Implementation ID suffix. */
    391 #define UDF_ENTITY_ID_FID_IMPLEMENTATION_USE    "*Developer ID"
    392 
    393 /** File entry, implementation ID field.
    394  * Implementation ID suffix. */
    395 #define UDF_ENTITY_ID_FE_IMPLEMENTATION         "*Developer ID"
    396 
    397 /** Device specification extended attribute, implementation use field.
    398  * Implementation ID suffix. */
    399 #define UDF_ENTITY_ID_DSEA_IMPLEMENTATION_USE   "*Developer ID"
    400372
    401373/** UDF implementation use extended attribute, implementation ID field, set
     
    418390#define UDF_ENTITY_ID_IUEA_OS400_DIR_INFO       "*UDF OS/400 DirInfo"
    419391
    420 /** Non-UDF implementation use extended attribute, implementation ID field.
    421  * Implementation ID suffix. */
    422 #define UDF_ENTITY_ID_NUIUSEA_IMPLEMENTATION    "*Developer ID"
    423 
    424392/** UDF application use extended attribute, application ID field, set
    425393 * to free application use EA space.  UDF ID suffix. */
    426394#define UDF_ENTITY_ID_AUEA_FREE_EA_SPACE        "*UDF FreeAppEASpace"
    427395
    428 /** Non-UDF application use extended attribute, implementation ID field.
    429  * Application ID suffix. */
    430 #define UDF_ENTITY_ID_NUAUEA_IMPLEMENTATION     "*Application ID"
    431 
    432 /** UDF unique ID mapping data, implementation ID field.
    433  * Implementation ID suffix. */
    434 #define UDF_ENTITY_ID_UIMD_IMPLEMENTATION       "*Developer ID"
    435 
    436 /** Power calibration table stream, implementation ID field.
    437  * Implementation ID suffix. */
    438 #define UDF_ENTITY_ID_PCTS_IMPLEMENTATION       "*Developer ID"
    439 
    440 /** Logical volume integrity descriptor, implementation ID field.
    441  * Implementation ID suffix. */
    442 #define UDF_ENTITY_ID_LVID_IMPLEMENTATION       "*Developer ID"
    443 
    444396/** Virtual partition map, partition type field.
    445397 * UDF ID suffix. */
    446398#define UDF_ENTITY_ID_VPM_PARTITION_TYPE        "*UDF Virtual Partition"
    447 
    448 /** Virtual allocation table, implementation use field.
    449  * Implementation ID suffix. */
    450 #define UDF_ENTITY_ID_VAT_IMPLEMENTATION_USE    "*Developer ID"
    451399
    452400/** Sparable partition map, partition type field.
     
    559507    /** 0x150: Volume copyright notice. */
    560508    UDFEXTENTAD     VolumeCopyrightNotice;
    561     /** 0x158: Application identifier (UDF_ENTITY_ID_PVD_APPLICATION). */
     509    /** 0x158: Application identifier ("*Application ID"). */
    562510    UDFENTITYID     idApplication;
    563511    /** 0x178: Recording date and time. */
    564512    UDFTIMESTAMP    RecordingTimestamp;
    565     /** 0x184: Implementation identifier (UDF_ENTITY_ID_PVD_IMPLEMENTATION). */
     513    /** 0x184: Implementation identifier ("*Developer ID"). */
    566514    UDFENTITYID     idImplementation;
    567515    /** 0x1a4: Implementation use. */
     
    665613            /** 0x13c: Info string \#3. */
    666614            UDFDSTRING      achInfo3[36];
    667             /** 0x160: The implementation identifier
    668              * (UDF_ENTITY_ID_IUVD_USE_IMPLEMENTATION). */
     615            /** 0x160: The implementation identifier ("*Developer ID"). */
    669616            UDFENTITYID     idImplementation;
    670617            /** 0x180: Additional use bytes. */
     
    744691    /** 0x0c0: Partition length in sectors. */
    745692    uint32_t        cSectors;
    746     /** 0x0c4: Implementation identifier (UDF_ENTITY_ID_PD_IMPLEMENTATION). */
     693    /** 0x0c4: Implementation identifier ("*Developer ID"). */
    747694    UDFENTITYID     idImplementation;
    748695    /** 0x0e4: Implemenation use bytes. */
     
    751698        /** Generic view. */
    752699        uint8_t     ab[128];
    753 
    754700    } ImplementationUse;
    755701    /** 0x164: Reserved. */
     
    757703} UDFPARTITIONDESC;
    758704AssertCompileSize(UDFPARTITIONDESC, 512);
     705/** Pointer to an UDF partitions descriptor. */
     706typedef UDFPARTITIONDESC *PUDFPARTITIONDESC;
     707/** Pointer to a const UDF partitions descriptor. */
     708typedef const UDFPARTITIONDESC *PCUDFPARTITIONDESC;
    759709
    760710/** @name UDF_PART_ACCESS_TYPE_XXX - UDF partition access types
     
    807757    /** 0x10c: Number of partition maps. */
    808758    uint32_t        cPartitionMaps;
    809     /** 0x110: Implementation identifier (UDF_ENTITY_ID_LVD_IMPLEMENTATION). */
     759    /** 0x110: Implementation identifier ("*Developer ID"). */
    810760    UDFENTITYID     idImplementation;
    811761    /** 0x130: Implementation use. */
     
    817767    /** 0x1b0: Integrity sequence extent. Can be zero if cPartitionMaps is zero. */
    818768    UDFEXTENTAD     IntegritySeqExtent;
    819     /** 0x1b8: Partition maps (length given by @a cPartitionMaps). */
     769    /** 0x1b8: Partition maps (length given by @a cbMapTable), data format is
     770     * defined by UDFPARTMAPHDR, UDFPARTMAPTYPE1 and UDFPARTMAPTYPE2. */
    820771    uint8_t         abPartitionMaps[RT_FLEXIBLE_ARRAY];
    821772} UDFLOGICALVOLUMEDESC;
     
    825776/** Pointer to a const UDF logical volume descriptor. */
    826777typedef UDFLOGICALVOLUMEDESC const *PCUDFLOGICALVOLUMEDESC;
     778
     779/**
     780 * Partition map header (UDFLOGICALVOLUMEDESC::abPartitionMaps).
     781 */
     782typedef struct UDFPARTMAPHDR
     783{
     784    /** 0x00: The partition map type. */
     785    uint8_t         bType;
     786    /** 0x01: The partition map length (header included). */
     787    uint8_t         cb;
     788} UDFPARTMAPHDR;
     789AssertCompileSize(UDFPARTMAPHDR, 2);
     790/** Pointer to a partition map header. */
     791typedef UDFPARTMAPHDR *PUDFPARTMAPHDR;
     792/** Pointer to a const partition map header. */
     793typedef UDFPARTMAPHDR const *PCUDFPARTMAPHDR;
     794
     795/**
     796 * Partition map type 1 (UDFLOGICALVOLUMEDESC::abPartitionMaps).
     797 */
     798typedef struct UDFPARTMAPTYPE1
     799{
     800    /** 0x00: Header (uType=1, cb=6). */
     801    UDFPARTMAPHDR   Hdr;
     802    /** 0x02: Volume sequence number. */
     803    uint16_t        uVolumeSeqNo;
     804    /** 0x04: Partition number. */
     805    uint16_t        uPartitionNo;
     806} UDFPARTMAPTYPE1;
     807AssertCompileSize(UDFPARTMAPTYPE1, 6);
     808/** Pointer to a type 1 partition map. */
     809typedef UDFPARTMAPTYPE1 *PUDFPARTMAPTYPE1;
     810/** Pointer to a const type 1 partition map. */
     811typedef UDFPARTMAPTYPE1 const *PCUDFPARTMAPTYPE1;
     812
     813/**
     814 * Partition map type 2 (UDFLOGICALVOLUMEDESC::abPartitionMaps).
     815 */
     816typedef struct UDFPARTMAPTYPE2
     817{
     818    /** 0x00: Header (uType=2, cb=64). */
     819    UDFPARTMAPHDR   Hdr;
     820    /** 0x02: Reserved \#1. */
     821    uint16_t        uReserved1;
     822    /** 0x04: Partition number (UDF_ENTITY_ID_VPM_PARTITION_TYPE). */
     823    UDFENTITYID     idPartitionType;
     824    /** 0x24: Volume sequence number. */
     825    uint16_t        uVolumeSeqNo;
     826    /** 0x26: Partition number. */
     827    uint16_t        uPartitionNo;
     828    /** 0x28: Reserved \#2. */
     829    uint8_t         abReserved2[24];
     830} UDFPARTMAPTYPE2;
     831AssertCompileSize(UDFPARTMAPTYPE2, 64);
     832/** Pointer to a type 2 partition map. */
     833typedef UDFPARTMAPTYPE2 *PUDFPARTMAPTYPE2;
     834/** Pointer to a const type 2 partition map1. */
     835typedef UDFPARTMAPTYPE2 const *PCUDFPARTMAPTYPE2;
    827836
    828837
     
    12451254    /** 0x70: Extended attribute information control block location. */
    12461255    UDFLONGAD       ExtAttribIcb;
    1247     /** 0x80: Implementation identifier (UDF_ENTITY_ID_FE_IMPLEMENTATION). */
     1256    /** 0x80: Implementation identifier ("*Developer ID"). */
    12481257    UDFENTITYID     idImplementation;
    12491258    /** 0xa0: Unique ID. */
     
    14521461    uint32_t        uMinorDeviceNo;
    14531462    /** 0x0c/0x18: Implementation use field (variable length).
    1454      * UDF specficiation expects UDFENTITYID with
    1455      * UDF_ENTITY_ID_DSEA_IMPLEMENTATION_USE as first part here. */
     1463     * UDF specficiation expects UDFENTITYID with a "*Developer ID" as first part
     1464     * here. */
    14561465    uint8_t         abImplementationUse[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION];
    14571466} UDFEADATADEVICESPEC;
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