4 El Torito Bootable CD Specification
6 #ifndef __SFJP_ROAST_EX__file__iso9660__eltorito_HPP__
7 #define __SFJP_ROAST_EX__file__iso9660__eltorito_HPP__
10 #include "roast/lexical/string_rule.hpp"
11 #include "roast/math/endian.hpp"
19 using namespace ::roast::lexical::rule;
22 typedef soft_repeat< unibyte<0>, 0x8800 > rule;
24 //class str_CD001 : public fixed_string{ public: str_CD001()
25 ROAST_LEXICAL_FIXSTR(str_CD001, "CD001")
26 ROAST_LEXICAL_FIXSTR(str_ELTORITOSPEC, "EL TORITO SPECIFICATION") // 23byte
30 unibyte<0>, // Volume Descriptor Type
32 unibyte<1>, // Volume Descriptor Version
34 // System Descriptor (32byte)
35 str_ELTORITOSPEC, // String 23byte
36 soft_repeat< unibyte<0>, 9 >, // Zero Padding (9byte)
38 // Volume Discriminator - Zero Padding (32byte)
39 soft_repeat< unibyte<0>, 32 >,
41 // [El Torito Only] Boot Record Volume Descriptor
42 fixed_uint< fixed_little_endian<unsigned int, 18 >::value > // 18 Sector
47 soft_repeat< unibyte<0>, 0x8800 >, // Zero Padding 17 Sectors (1 Sector = 2048byte)
50 >>>>>>> 63d7ba7... eltorito.hpp: とりあえず「Boot Record Volume Descriptor」の手前まで
53 ////////////////////////////////////////////////////////
58 bool write(const char* filename, const unsigned char* boot_img, size_t size )
60 ::std::fstream fs(filename, std::ios::out | std::ios::binary);
65 rl.generate(fs, boot_img);
73 #endif//__SFJP_ROAST_EX__file__iso9660__eltorito_HPP__