+ print "<mountpoints>\n";
+ my $mounts = $os->{mounts};
+ foreach (sort keys %$mounts) {
+ printf "<mountpoint dev='%s'>%s</mountpoint>\n",
+ $mounts->{$_}, $_
+ }
+ print "</mountpoints>\n";
+
+ print "<filesystems>\n";
+ my $filesystems = $os->{filesystems};
+ foreach (sort keys %$filesystems) {
+ print "<filesystem dev='$_'>\n";
+ print "<label>$filesystems->{$_}{label}</label>\n"
+ if exists $filesystems->{$_}{label};
+ print "<uuid>$filesystems->{$_}{uuid}</uuid>\n"
+ if exists $filesystems->{$_}{uuid};
+ print "<type>$filesystems->{$_}{fstype}</type>\n"
+ if exists $filesystems->{$_}{fstype};
+ print "<content>$filesystems->{$_}{content}</content>\n"
+ if exists $filesystems->{$_}{content};
+ print "</filesystem>\n";
+ }
+ print "</filesystems>\n";
+
+ print "<applications>\n";
+ my @apps = @{$os->{apps}};
+ foreach (@apps) {
+ print "<application>\n";
+ print "<name>$_->{name}</name><version>$_->{version}</version>\n";
+ print "</application>\n";
+ }
+ print "</applications>\n";
+
+ print "<kernels>\n";
+ my @kernels = @{$os->{kernels}};
+ foreach (@kernels) {
+ print "<kernel>\n";
+ print "<version>$_->{version}</version>\n";
+ print "<modules>\n";
+ my @modules = @{$_->{modules}};
+ foreach (@modules) {
+ print "<module>$_</module>\n";
+ }
+ print "</modules>\n";
+ print "</kernel>\n";
+ }
+ print "</kernels>\n";