From c47c9c240c8e4208b00a1e67170f890f3ee8aae0 Mon Sep 17 00:00:00 2001 From: Myun2 Date: Sun, 8 Aug 2010 14:37:03 +0900 Subject: [PATCH] =?utf8?q?eltorito.hpp:=20Boot=20Record=20Volume=20Descrip?= =?utf8?q?tor=E3=81=AE=E4=BD=8D=E7=BD=AE=E7=A4=BA=E3=81=97=E3=81=BE?= =?utf8?q?=E3=81=A7=E5=87=BA=E6=9D=A5=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- roast/include/roast/lexical/rule.hpp | 6 +++++- roast_ex/include/roast/file/iso9660/eltorito.hpp | 12 +++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/roast/include/roast/lexical/rule.hpp b/roast/include/roast/lexical/rule.hpp index 6d2b0a82..2d765f26 100644 --- a/roast/include/roast/lexical/rule.hpp +++ b/roast/include/roast/lexical/rule.hpp @@ -527,6 +527,8 @@ namespace roast ///////////////////////////////////////////////////////////// + + template class fixed_numeric { @@ -548,7 +550,9 @@ namespace roast template bool generate(_Strm& strm, _Document& doc) { - strm << _Val; + //strm << _Val; + T v = _Val; + strm.write((const char*)&v, sizeof(_Val)); return true; } }; diff --git a/roast_ex/include/roast/file/iso9660/eltorito.hpp b/roast_ex/include/roast/file/iso9660/eltorito.hpp index fdd9e983..ab6c303c 100644 --- a/roast_ex/include/roast/file/iso9660/eltorito.hpp +++ b/roast_ex/include/roast/file/iso9660/eltorito.hpp @@ -8,6 +8,7 @@ #include #include "roast/lexical/string_rule.hpp" +#include "roast/math/endian.hpp" namespace roast { @@ -29,13 +30,18 @@ namespace roast // System Descriptor (32byte) str_ELTORITOSPEC, // String 23byte - soft_repeat< unibyte<0>, 9 >, // Padding (9byte) - soft_repeat< unibyte<0>, 32 > // Volume Discriminator (32byte) + soft_repeat< unibyte<0>, 9 >, // Zero Padding (9byte) + + // Volume Discriminator - Zero Padding (32byte) + soft_repeat< unibyte<0>, 32 >, + + // [El Torito Only] Boot Record Volume Descriptor + fixed_uint< fixed_little_endian::value > // 18 Sector > _volume_desc; // rule typedef seq< - soft_repeat< unibyte<0>, 0x8800 >, + soft_repeat< unibyte<0>, 0x8800 >, // Zero Padding 17 Sectors (1 Sector = 2048byte) _volume_desc > rule; } -- 2.11.0