儲存庫 vbox 的更動 67426
- 時間撮記:
- 2017-6-15 下午02:18:16 (7 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/include/iprt/formats/iso9660.h
r67339 r67426 361 361 } ISO9660BOOTRECORD; 362 362 AssertCompileSize(ISO9660BOOTRECORD, ISO9660_SECTOR_SIZE); 363 /** Pointer to a ISO 9660 boot record. */363 /** Pointer to an ISO 9660 boot record. */ 364 364 typedef ISO9660BOOTRECORD *PISO9660BOOTRECORD; 365 365 /** Pointer to a const ISO 9660 boot record. */ … … 369 369 #define ISO9660BOOTRECORD_VERSION UINT8_C(1) 370 370 371 372 /** 373 * ISO 9660 boot record (volume descriptor), El Torito variant. 374 */ 375 #pragma pack(1) 376 typedef struct ISO9660BOOTRECORDELTORITO 377 { 378 /** 0x000: The volume descriptor header. 379 * Type is ISO9660VOLDESC_TYPE_BOOT_RECORD and version 380 * ISO9660BOOTRECORD_VERSION. */ 381 ISO9660VOLDESCHDR Hdr; 382 /** 0x007: Boot system identifier string, 383 * zero padded ISO9660BOOTRECORDELTORITO_BOOT_SYSTEM_ID. */ 384 char achBootSystemId[32]; 385 /** 0x027: Boot identifier - all zeros. */ 386 char achBootId[32]; 387 /** 0x047: Boot catalog location (block offset), always (?) little endian. 388 * @note Misaligned. */ 389 uint32_t offBootCatalog; 390 /** 0x04b: Unused - all zeros. */ 391 uint8_t abBootSystemSpecific[1973]; 392 } ISO9660BOOTRECORDELTORITO; 393 #pragma pack() 394 AssertCompileSize(ISO9660BOOTRECORDELTORITO, ISO9660_SECTOR_SIZE); 395 /** Pointer to an ISO 9660 El Torito boot record. */ 396 typedef ISO9660BOOTRECORDELTORITO *PISO9660BOOTRECORDELTORITO; 397 /** Pointer to a const ISO 9660 El Torito boot record. */ 398 typedef ISO9660BOOTRECORDELTORITO const *PCISO9660BOOTRECORDELTORITO; 399 400 /** The value of ISO9660BOOTRECORDELTORITO::achBootSystemId (zero padded). */ 401 #define ISO9660BOOTRECORDELTORITO_BOOT_SYSTEM_ID "EL TORITO SPECIFICATION" 371 402 372 403 … … 630 661 631 662 663 /** 664 * El Torito boot catalog: Validation entry. 665 * 666 * This is the first entry in the boot catalog. It is followed by a 667 * ISO9660ELTORITODEFAULTENTRY, which in turn is followed by a 668 * ISO9660ELTORITOSECTIONHEADER. 669 */ 670 typedef struct ISO9660ELTORITOVALIDATIONENTRY 671 { 672 /** 0x00: The header ID (ISO9660_ELTORITO_HEADER_ID_VALIDATION_ENTRY). */ 673 uint8_t bHeaderId; 674 /** 0x01: The platform ID (ISO9660_ELTORITO_PLATFORM_ID_XXX). */ 675 uint8_t bPlatformId; 676 /** 0x02: Reserved, MBZ. */ 677 uint16_t u16Reserved; 678 /** 0x04: String ID of the developer of the CD/DVD-ROM. */ 679 char achId[24]; 680 /** 0x1c: The checksum. */ 681 uint16_t u16Checksum; 682 /** 0x1e: Key byte 1 (ISO9660_ELTORITO_KEY_BYTE_1). */ 683 uint8_t bKey1; 684 /** 0x1f: Key byte 2 (ISO9660_ELTORITO_KEY_BYTE_2). */ 685 uint8_t bKey2; 686 } ISO9660ELTORITOVALIDATIONENTRY; 687 AssertCompileSize(ISO9660ELTORITOVALIDATIONENTRY, 0x20); 688 /** Pointer to an El Torito validation entry. */ 689 typedef ISO9660ELTORITOVALIDATIONENTRY *PISO9660ELTORITOVALIDATIONENTRY; 690 /** Pointer to a const El Torito validation entry. */ 691 typedef ISO9660ELTORITOVALIDATIONENTRY const *PCISO9660ELTORITOVALIDATIONENTRY; 692 693 /** ISO9660ELTORITOVALIDATIONENTRY::bKey1 value. */ 694 #define ISO9660_ELTORITO_KEY_BYTE_1 UINT8_C(0x55) 695 /** ISO9660ELTORITOVALIDATIONENTRY::bKey2 value. */ 696 #define ISO9660_ELTORITO_KEY_BYTE_2 UINT8_C(0xaa) 697 698 699 /** @name ISO9660_ELTORITO_HEADER_ID_XXX - header IDs. 700 * @{ */ 701 /** Header ID for a ISO9660ELTORITOVALIDATIONENTRY. */ 702 #define ISO9660_ELTORITO_HEADER_ID_VALIDATION_ENTRY UINT8_C(0x01) 703 /** Header ID for a ISO9660ELTORITOSECTIONHEADER. */ 704 #define ISO9660_ELTORITO_HEADER_ID_SECTION_HEADER UINT8_C(0x90) 705 /** Header ID for the final ISO9660ELTORITOSECTIONHEADER. */ 706 #define ISO9660_ELTORITO_HEADER_ID_FINAL_SECTION_HEADER UINT8_C(0x91) 707 /** @} */ 708 709 710 /** @name ISO9660_ELTORITO_PLATFORM_ID_XXX - El Torito Platform IDs 711 * @{ */ 712 #define ISO9660_ELTORITO_PLATFORM_ID_X86 UINT8_C(0x00) /**< 80x86 */ 713 #define ISO9660_ELTORITO_PLATFORM_ID_PPC UINT8_C(0x01) /**< PowerPC */ 714 #define ISO9660_ELTORITO_PLATFORM_ID_MAC UINT8_C(0x02) /**< Mac */ 715 #define ISO9660_ELTORITO_PLATFORM_ID_EFI UINT8_C(0xef) /**< UEFI */ 716 /** @} */ 717 718 719 /** 720 * El Torito boot catalog: Section header entry. 721 * 722 * A non-final section header entry is followed by 723 * ISO9660ELTORITOSECTIONHEADER::cEntries ISO9660ELTORITOSECTIONTENTRY instances. 724 */ 725 typedef struct ISO9660ELTORITOSECTIONHEADER 726 { 727 /** 0x00: Header ID - ISO9660_ELTORITO_HEADER_ID_SECTION_HEADER or 728 * ISO9660_ELTORITO_HEADER_ID_FINAL_SECTION_HEADER (if final). */ 729 uint8_t bHeaderId; 730 /** 0x01: The platform ID (ISO9660_ELTORITO_PLATFORM_ID_XXX). */ 731 uint8_t bPlatformId; 732 /** 0x02: Number of entries in this section (i.e. following this header). */ 733 uint16_t cEntries; 734 /** 0x04: String ID for the section. */ 735 char achSectionId[28]; 736 } ISO9660ELTORITOSECTIONHEADER; 737 AssertCompileSize(ISO9660ELTORITOSECTIONHEADER, 0x20); 738 /** Pointer to an El Torito section header entry. */ 739 typedef ISO9660ELTORITOSECTIONHEADER *PISO9660ELTORITOSECTIONHEADER; 740 /** Pointer to a const El Torito section header entry. */ 741 typedef ISO9660ELTORITOSECTIONHEADER const *PCISO9660ELTORITOSECTIONHEADER; 742 743 744 /** 745 * El Torito boot catalog: Default (initial) entry. 746 * 747 * Followed by ISO9660ELTORITOSECTIONHEADER. 748 * 749 * Differs from ISO9660ELTORITOSECTIONENTRY in that it doesn't have a 750 * selection criteria and no media flags (only type). 751 */ 752 typedef struct ISO9660ELTORITODEFAULTENTRY 753 { 754 /** 0x00: Boot indicator (ISO9660_ELTORITO_BOOT_INDICATOR_XXX). */ 755 uint8_t bBootIndicator; 756 /** 0x01: Boot media type. The first four bits are defined by 757 * ISO9660_ELTORITO_BOOT_MEDIA_TYPE_XXX, whereas the top four bits MBZ. */ 758 uint8_t bBootMediaType; 759 /** 0x02: Load segment - load address divided by 0x10. */ 760 uint16_t uLoadSeg; 761 /** 0x04: System type from image partition table. */ 762 uint8_t bSystemType; 763 /** 0x05: Unused, MBZ. */ 764 uint8_t bUnused; 765 /** 0x06: Number of emulated 512 byte sectors to load. */ 766 uint16_t cEmulatedSectorsToLoad; 767 /** 0x08: Image location in the ISO (block offset), always (?) little endian. */ 768 uint32_t offBootImage; 769 /** 0x0c: Reserved, MBZ */ 770 uint8_t abReserved[20]; 771 } ISO9660ELTORITODEFAULTENTRY; 772 AssertCompileSize(ISO9660ELTORITODEFAULTENTRY, 0x20); 773 /** Pointer to an El Torito default (initial) entry. */ 774 typedef ISO9660ELTORITODEFAULTENTRY *PISO9660ELTORITODEFAULTENTRY; 775 /** Pointer to a const El Torito default (initial) entry. */ 776 typedef ISO9660ELTORITODEFAULTENTRY const *PCISO9660ELTORITODEFAULTENTRY; 777 778 779 /** 780 * El Torito boot catalg: Section entry. 781 */ 782 typedef struct ISO9660ELTORITOSECTIONENTRY 783 { 784 /** 0x00: Boot indicator (ISO9660_ELTORITO_BOOT_INDICATOR_XXX). */ 785 uint8_t bBootIndicator; 786 /** 0x01: Boot media type and flags. The first four bits are defined by 787 * ISO9660_ELTORITO_BOOT_MEDIA_TYPE_XXX and the top four bits by 788 * ISO9660_ELTORITO_BOOT_MEDIA_F_XXX. */ 789 uint8_t bBootMediaType; 790 /** 0x02: Load segment - load address divided by 0x10. */ 791 uint16_t uLoadSeg; 792 /** 0x04: System type from image partition table. */ 793 uint8_t bSystemType; 794 /** 0x05: Unused, MBZ. */ 795 uint8_t bUnused; 796 /** 0x06: Number of emulated 512 byte sectors to load. */ 797 uint16_t cEmulatedSectorsToLoad; 798 /** 0x08: Image location in the ISO (block offset), always (?) little endian. */ 799 uint32_t offBootImage; 800 /** 0x0c: Selection criteria type (ISO9660_ELTORITO_SEL_CRIT_TYPE_XXX). */ 801 uint8_t bSelectionCriteriaType; 802 /** 0x0c: Selection criteria specific data. */ 803 uint8_t abSelectionCriteria[19]; 804 } ISO9660ELTORITOSECTIONENTRY; 805 AssertCompileSize(ISO9660ELTORITOSECTIONENTRY, 0x20); 806 /** Pointer to an El Torito default (initial) entry. */ 807 typedef ISO9660ELTORITOSECTIONENTRY *PISO9660ELTORITOSECTIONENTRY; 808 /** Pointer to a const El Torito default (initial) entry. */ 809 typedef ISO9660ELTORITOSECTIONENTRY const *PCISO9660ELTORITOSECTIONENTRY; 810 811 812 /** @name ISO9660_ELTORITO_BOOT_INDICATOR_XXX - Boot indicators. 813 * @{ */ 814 #define ISO9660_ELTORITO_BOOT_INDICATOR_BOOTABLE UINT8_C(0x88) 815 #define ISO9660_ELTORITO_BOOT_INDICATOR_NOT_BOOTABLE UINT8_C(0x00) 816 /** @} */ 817 818 /** @name ISO9660_ELTORITO_BOOT_MEDIA_TYPE_XXX - Boot media types. 819 * @{ */ 820 #define ISO9660_ELTORITO_BOOT_MEDIA_TYPE_NO_EMULATION UINT8_C(0x0) 821 #define ISO9660_ELTORITO_BOOT_MEDIA_TYPE_FLOPPY_1_2_MB UINT8_C(0x1) 822 #define ISO9660_ELTORITO_BOOT_MEDIA_TYPE_FLOPPY_1_44_MB UINT8_C(0x2) 823 #define ISO9660_ELTORITO_BOOT_MEDIA_TYPE_FLOPPY_2_88_MB UINT8_C(0x3) 824 #define ISO9660_ELTORITO_BOOT_MEDIA_TYPE_HARD_DISK UINT8_C(0x4) 825 #define ISO9660_ELTORITO_BOOT_MEDIA_TYPE_MASK UINT8_C(0xf) /**< The media type mask. */ 826 /** @} */ 827 828 /** @name ISO9660_ELTORITO_BOOT_MEDIA_F_XXX - Boot media flags. 829 * These only applies to the section entry, not to the default (initial) entry. 830 * @{ */ 831 #define ISO9660_ELTORITO_BOOT_MEDIA_F_RESERVED UINT8_C(0x10) /**< Reserved bit, MBZ. */ 832 #define ISO9660_ELTORITO_BOOT_MEDIA_F_CONTINUATION UINT8_C(0x20) /**< Contiunation entry follows. */ 833 #define ISO9660_ELTORITO_BOOT_MEDIA_F_ATAPI_DRIVER UINT8_C(0x40) /**< Image contains an ATAPI driver. */ 834 #define ISO9660_ELTORITO_BOOT_MEDIA_F_SCSI_DRIVERS UINT8_C(0x80) /**< Image contains SCSI drivers. */ 835 #define ISO9660_ELTORITO_BOOT_MEDIA_F_MASK UINT8_C(0xf0) /**< The media/entry flag mask. */ 836 /** @} */ 837 838 /** @name ISO9660_ELTORITO_SEL_CRIT_TYPE_XXX - Selection criteria type. 839 * @{ */ 840 #define ISO9660_ELTORITO_SEL_CRIT_TYPE_NONE UINT8_C(0x00) /**< No selection criteria */ 841 #define ISO9660_ELTORITO_SEL_CRIT_TYPE_LANG_AND_VERSION UINT8_C(0x01) /**< Language and version (IBM). */ 842 /** @} */ 843 844 845 /** 846 * El Torito boot catalog: Section entry extension. 847 * 848 * This is used for carrying additional selection criteria data. It follows 849 * a ISO9660ELTORITOSECTIONENTRY. 850 */ 851 typedef struct ISO9660ELTORITOSECTIONENTRYEXT 852 { 853 /** 0x00: Extension indicator (ISO9660_ELTORITO_SECTION_ENTRY_EXT_ID). */ 854 uint8_t bExtensionId; 855 /** 0x01: Selection criteria extension flags (ISO9660_ELTORITO_SECTION_ENTRY_EXT_F_XXX). */ 856 uint8_t fFlags; 857 /** 0x02: Selection critiera data. */ 858 uint8_t abSelectionCriteria[30]; 859 } ISO9660ELTORITOSECTIONENTRYEXT; 860 AssertCompileSize(ISO9660ELTORITOSECTIONENTRYEXT, 0x20); 861 /** Pointer to an El Torito default (initial) entry. */ 862 typedef ISO9660ELTORITOSECTIONENTRYEXT *PISO9660ELTORITOSECTIONENTRYEXT; 863 /** Pointer to a const El Torito default (initial) entry. */ 864 typedef ISO9660ELTORITOSECTIONENTRYEXT const *PCISO9660ELTORITOSECTIONENTRYEXT; 865 866 /** Value of ISO9660ELTORITOSECTIONENTRYEXT::bExtensionId. */ 867 #define ISO9660_ELTORITO_SECTION_ENTRY_EXT_ID UINT_C(0x44) 868 869 /** @name ISO9660_ELTORITO_SECTION_ENTRY_EXT_F_XXX - ISO9660ELTORITOSECTIONENTRYEXT::fFlags 870 * @{ */ 871 #define ISO9660_ELTORITO_SECTION_ENTRY_EXT_F_MORE UINT8_C(0x20) /**< Further extension entries follows. */ 872 #define ISO9660_ELTORITO_SECTION_ENTRY_EXT_F_UNUSED_MASK UINT8_C(0xef) /**< Mask of all unused bits. */ 873 /** @} */ 874 875 876 /** 877 * Boot information table used by isolinux and GRUB2 El Torito boot files. 878 */ 879 typedef struct ISO9960SYSLINUXINFOTABLE 880 { 881 /** 0x00/0x08: Offset of the primary volume descriptor (block offset). */ 882 uint32_t offPrimaryVolDesc; 883 /** 0x04/0x0c: Offset of the boot file (block offset). */ 884 uint32_t offBootFile; 885 /** 0x08/0x10: Size of the boot file in bytes. */ 886 uint32_t cbBootFile; 887 /** 0x0c/0x14: Boot file checksum. 888 * This is the sum of all the 32-bit words in the image, start at the end of 889 * this structure (i.e. offset 64). */ 890 uint32_t uChecksum; 891 /** 0x10/0x18: Reserved for future fun. */ 892 uint32_t auReserved[10]; 893 } ISO9960SYSLINUXINFOTABLE; 894 AssertCompileSize(ISO9960SYSLINUXINFOTABLE, 56); 895 /** Pointer to a syslinux boot information table. */ 896 typedef ISO9960SYSLINUXINFOTABLE *PISO9960SYSLINUXINFOTABLE; 897 /** Pointer to a const syslinux boot information table. */ 898 typedef ISO9960SYSLINUXINFOTABLE const *PCISO9960SYSLINUXINFOTABLE; 899 632 900 /** @} */ 633 901
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器