X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=KernelLand%2FModules%2FFilesystems%2FInitRD%2FGenerateInitRD.php;h=4a6635b4bc4b24f0328d447bdfd5f377d085cecc;hb=cb414d6f5f9730d64b4914e45c14d9c16aea0b6c;hp=e7cd4f7e416fb2d3c7267e429a8e41b0d6291350;hpb=51ab5f489bc356940c95cc936fd0508e8f07ea97;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php b/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php index e7cd4f7e..4a6635b4 100644 --- a/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php +++ b/KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php @@ -28,6 +28,7 @@ $lStack = array( array("",array()) ); foreach($lines as $line) { $line = trim($line); + if($line[0] == "#") continue; // Directory if(preg_match('/^Dir\s+"([^"]+)"\s+{$/', $line, $matches)) { @@ -122,36 +123,9 @@ EOF; } $size = filesize($path); -/* - $_sym = $prefix."_".$i."_data"; - $fp = fopen($path, "rb"); - - $gOutput .= "Uint8 $_sym[] = {\n"; - for( $j = 0; $j + 16 < $size; $j += 16 ) { - $gOutput .= "\t"; - $gOutput .= hd8($fp).",".hd8($fp).","; - $gOutput .= hd8($fp).",".hd8($fp).","; - $gOutput .= hd8($fp).",".hd8($fp).","; - $gOutput .= hd8($fp).",".hd8($fp).","; - $gOutput .= hd8($fp).",".hd8($fp).","; - $gOutput .= hd8($fp).",".hd8($fp).","; - $gOutput .= hd8($fp).",".hd8($fp).","; - $gOutput .= hd8($fp).",".hd8($fp).",\n"; - } - $gOutput .= "\t"; - for( ; $j < $size; $j ++ ) { - if( $j & 15 ) $gOutput .= ","; - $gOutput .= hd8($fp); - } - fclose($fp); - $gOutput .= "\n};\n"; -*/ - -//* $_sym = "_binary_".str_replace(array("/","-","."), "_", $path)."_start"; $gOutput .= "extern Uint8 {$_sym}[];"; $gSymFiles[] = $path; -//*/ $gOutput .= <<