OSDN Git Service

eltorito.hpp: detail fix
authorMyun2 <myun2@nwhite.info>
Sun, 8 Aug 2010 06:08:44 +0000 (15:08 +0900)
committerMyun2 <myun2@nwhite.info>
Tue, 10 Aug 2010 18:09:59 +0000 (03:09 +0900)
roast_ex/include/roast/file/iso9660/eltorito.hpp

index 0a967f2..04a868c 100644 (file)
@@ -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<unsigned int, 18>::value >,     //      Boot Record Volume is No.18 Sector
+                               fixed_uint< fixed_little_endian<unsigned int, _boot_catalog_sector_no>::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」の手前まで
                }