From 5d3716fcc88944f54648d03d441a2a8e417002ea Mon Sep 17 00:00:00 2001 From: Myun2 Date: Wed, 11 Aug 2010 03:07:52 +0900 Subject: [PATCH] =?utf8?q?eltorito.hpp:=20=E3=81=A8=E3=82=8A=E3=81=82?= =?utf8?q?=E3=81=88=E3=81=9A=E6=9C=80=E5=88=9D=E3=81=AE0x8800=E3=83=90?= =?utf8?q?=E3=82=A4=E3=83=88=E3=81=BE=E3=81=A7=E3=82=92=E6=9B=B8=E3=81=8D?= =?utf8?q?=E8=BE=BC=E3=82=80=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=A6?= =?utf8?q?=E3=81=BF=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast_ex/include/roast/file/iso9660/eltorito.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/roast_ex/include/roast/file/iso9660/eltorito.hpp b/roast_ex/include/roast/file/iso9660/eltorito.hpp index a551528..a01b10c 100644 --- a/roast_ex/include/roast/file/iso9660/eltorito.hpp +++ b/roast_ex/include/roast/file/iso9660/eltorito.hpp @@ -6,11 +6,35 @@ #ifndef __SFJP_ROAST_EX__file__iso9660__eltorito_HPP__ #define __SFJP_ROAST_EX__file__iso9660__eltorito_HPP__ +#include +#include "roast/lexical/string_rule.hpp" + namespace roast { namespace iso9660 { + namespace eltorito + { + using namespace ::roast::lexical::rule; + + typedef soft_repeat< unibyte<0>, 0x8800 > rule; + } + + class eltorito_writer + { + public: + bool write(const char* filename, const unsigned char* boot_img, size_t size ) + { + ::std::fstream fs(filename, std::ios::out | std::ios::binary); + if ( fs.fail() ) + return false; + + eltorito::rule rl; + rl.generate(fs, boot_img); + return true; + } + }; } } -- 2.11.0