UDI/bus_pci - Apply erratum E20010702.1, handle status from preprocessed interrupts
[tpg/acess2.git] / KernelLand / Modules / Filesystems / InitRD / GenerateInitRD.php
index 4a6635b..44c005a 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+date_default_timezone_set("UTC");
+
 $lGenDate = date("Y-m-d H:i");
 $gOutput = <<<EOF
 /*
@@ -45,8 +47,12 @@ foreach($lines as $line)
                continue;
        }
        // File
-       if(preg_match('/^File\s+"([^"]+)"\s+"([^"]+)"$/', $line, $matches))
+       if(preg_match('/^File\s+"([^"]+)"(?:\s+"([^"]+)")?$/', $line, $matches))
        {
+               if( !isset($matches[2]) ) {
+                       $matches[2] = $matches[1];
+                       $matches[1] = basename($matches[2]);
+               }
                $lStack[$lDepth][1][] = array($matches[1], $matches[2]);
                continue;
        }

UCC git Repository :: git.ucc.asn.au