-# my $g;
-# if ($uri) {
-# $g = open_guest (\@ARGV, rw => $rw, address => $uri);
-# } else {
-# $g = open_guest (\@ARGV, rw => $rw);
-# }
+# XXX This should be an option. Disable for now until we get
+# downloads working reliably.
+my $use_windows_registry = 0;
+
+my @params = (\@ARGV);
+if ($uri) {
+ push @params, address => $uri;
+}
+my ($g, $conn, $dom) = open_guest (@params);
+
+$g->launch ();
+$g->wait_ready ();
+
+# List of possible filesystems.
+my @partitions = get_partitions ($g);
+
+# Now query each one to build up a picture of what's in it.
+my %fses =
+ inspect_all_partitions ($g, \@partitions,
+ use_windows_registry => $use_windows_registry);
+
+#print "fses -----------\n";
+#print Dumper(\%fses);
+
+my $oses = inspect_operating_systems ($g, \%fses);
+
+#print "oses -----------\n";
+#print Dumper($oses);
+
+# We should probably refuse to do anything with those rare
+# multiboot VMs at this point ... (XXX)
+
+# Mount up the disks and check for applications.
+
+my $root_dev;
+foreach $root_dev (sort keys %$oses) {
+ my $os = $oses->{$root_dev};
+ mount_operating_system ($g, $os);
+ inspect_in_detail ($g, $os);
+ $g->umount_all ();
+}
+
+
+
+
+
+
+
+
+
+
+