[Fai-commit] r3604 - people/michael/features/setup_harddisks_2/implementation

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Sat Jul 22 10:24:39 UTC 2006


Author: michael-guest
Date: 2006-07-22 10:24:38 +0000 (Sat, 22 Jul 2006)
New Revision: 3604

Modified:
   people/michael/features/setup_harddisks_2/implementation/shdd2-parser
Log:
added dirty hack to output our tree


Modified: people/michael/features/setup_harddisks_2/implementation/shdd2-parser
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/shdd2-parser	2006-07-22 09:27:43 UTC (rev 3603)
+++ people/michael/features/setup_harddisks_2/implementation/shdd2-parser	2006-07-22 10:24:38 UTC (rev 3604)
@@ -332,6 +332,10 @@
 });
 
 
+#foreach my $key ( %FAI::configs)
+#{
+#  printf "$key \n";
+#}
 
 sub in_path
 {
@@ -350,6 +354,52 @@
     
 }
 
+
+sub print_hash
+{
+  my ($hash_ref_ref) = @_;
+
+
+  my %hash_ref = %$hash_ref_ref;
+  printf "----\n";
+  print (keys %hash_ref, "\n"); 
+  foreach my $key ( keys %hash_ref)  # Cycle through all key
+  {
+    print $hash_ref{$key}."\n";
+
+    foreach my $key2 (keys %{$hash_ref{$key}})
+    {
+
+
+      printf "Schluessel: ". $key2." Wert: ".$hash_ref{$key}{$key2}."\n"; 
+      if($key2 eq "partitions")
+      {
+        foreach my $key3 (keys %{$hash_ref{$key}{$key2}})
+        {
+          printf "--> Schluessel: ". $key3." Wert: ".$hash_ref{$key}{$key2}{$key3}."\n";
+          foreach my $key4 (keys %{$hash_ref{$key}{$key2}{$key3}})
+          {
+            printf "---> Schluessel: ". $key4." Wert: ".$hash_ref{$key}{$key2}{$key3}{$key4}."\n";
+            if($key4 eq "size")
+            {
+              foreach my $key5 (keys %{$hash_ref{$key}{$key2}{$key3}{$key4}})
+              {
+                printf "----> Schluessel: ". $key5." Wert: ".$hash_ref{$key}{$key2}{$key3}{$key4}{$key5}."\n";     
+              }
+            }
+
+          }
+
+
+        }
+      }
+
+    }
+
+  }
+  printf "----\n";
+}
+
 my $ifs = $/;
 undef $/;
 my $input = <STDIN>;
@@ -359,5 +409,8 @@
 
 defined $Parser->file( $input ) or die "Syntax error\n";
 
+#&print_hash(\%FAI::configs);
+
+
 1;
 




More information about the Fai-commit mailing list