From c01af3638df1f7dd9a5debfd96ec9116b259fe5d Mon Sep 17 00:00:00 2001 From: Myun2 Date: Sun, 8 Aug 2010 15:08:44 +0900 Subject: [PATCH] eltorito.hpp: detail fix --- roast_ex/include/roast/file/iso9660/eltorito.hpp | 32 ++++++++++++++++-------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/roast_ex/include/roast/file/iso9660/eltorito.hpp b/roast_ex/include/roast/file/iso9660/eltorito.hpp index 0a967f2..04a868c 100644 --- a/roast_ex/include/roast/file/iso9660/eltorito.hpp +++ b/roast_ex/include/roast/file/iso9660/eltorito.hpp @@ -10,6 +10,8 @@ #include "roast/lexical/string_rule.hpp" #include "roast/math/endian.hpp" +#define ROAST_SECTOR_NO_BRVD (17) // Boot Record Volume Descriptor + namespace roast { namespace iso9660 @@ -25,10 +27,17 @@ namespace roast ROAST_LEXICAL_FIXSTR(str_CD001, "CD001") ROAST_LEXICAL_FIXSTR(str_ELTORITOSPEC, "EL TORITO SPECIFICATION") // 23byte + enum + { + _boot_catalog_sector_no = 18, + _boot_sector_no = 19 + }; + // Zero Padding Sector typedef soft_repeat< unibyte<0>, 2048 > zero_padding_sector; - // _volume_desc + + // Boot Record Volume Descriptor Sector typedef seq< unibyte<0>, // Volume Descriptor Type str_CD001, @@ -45,13 +54,14 @@ namespace roast soft_repeat< unibyte<0>, 9 + 32 >, // [El Torito Only] Boot Record Volume Descriptor - fixed_uint< fixed_little_endian::value >, // Boot Record Volume is No.18 Sector + fixed_uint< fixed_little_endian::value >, // Boot Record Volume is No.18 Sector // Zero Padding Sector Rest soft_repeat< unibyte<0>, 2048 - 0x4B > - > _volume_desc; + > brvd_sector; + - // Boot Record Volume Descriptor + // Boot Catalog Sector typedef seq< unibyte<1>, // Volume Descriptor Type -> 1(PVD) unibyte<0>, // 0:80x86 @@ -70,19 +80,19 @@ namespace roast // 3: 2.88MB FDD Emulate, // 4: HDD Emulate - fixed_ushort< 0x0000 >, // Read Segment: 0 is Default (0x07c0) - fixed_ushort< 0x0001 >, // Boost Sector Count - fixed_uint<20>, // Boost Sector No. + fixed_ushort< 0x0000 >, // Read Segment: 0 is Default (0x07c0) + fixed_ushort< 0x0001 >, // Boot Sector Count + fixed_uint<_boot_sector_no>, // Boot Sector No. // Zero Padding Sector Rest soft_repeat< unibyte<0>, 2048 - 0x2B > - > _boot_record_volume_desc; + > boot_catalog_sector; // rule typedef seq< - soft_repeat< zero_padding_sector, 17 >, // Zero Padding 17 Sectors - _volume_desc, - _boot_record_volume_desc + soft_repeat< zero_padding_sector, ROAST_SECTOR_NO_BRVD >, // Zero Padding 17 Sectors + brvd_sector, + boot_catalog_sector > rule; >>>>>>> 63d7ba7... eltorito.hpp: とりあえず「Boot Record Volume Descriptor」の手前まで } -- 2.11.0