summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-15 13:53:32 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-15 13:55:55 +0000
commit91cede3465cd2496a01a89d5c8815df7c326c2ec (patch)
treefc0f79a4adb5100f383f9332f3955fff895fbbef /src
parent2bc922dd8e12bcf05e0aeef8a8b60b6aab9ee915 (diff)
downloadlibguestfs-91cede3465cd2496a01a89d5c8815df7c326c2ec.tar.gz
libguestfs-91cede3465cd2496a01a89d5c8815df7c326c2ec.tar.xz
libguestfs-91cede3465cd2496a01a89d5c8815df7c326c2ec.zip
inspect: Ignore missing HKLM\SYSTEM\MountedDevices (RHBZ#803664).
When a Windows guest doesn't have a HKLM\SYSTEM\MountedDevices node, inspection fails. However inspection should not completely fail just because we cannot get the drive letter mapping from a guest.
Diffstat (limited to 'src')
-rw-r--r--src/inspect_fs_windows.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/inspect_fs_windows.c b/src/inspect_fs_windows.c
index 11454dff..1a341927 100644
--- a/src/inspect_fs_windows.c
+++ b/src/inspect_fs_windows.c
@@ -395,10 +395,11 @@ check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs)
errno = 0;
node = hivex_node_get_child (h, root, "MountedDevices");
if (node == 0) {
- if (errno != 0)
- perrorf (g, "hivex_node_get_child");
- else
- error (g, "hivex: could not locate HKLM\\SYSTEM\\MountedDevices");
+ if (errno == 0)
+ /* Not found: skip getting drive letter mappings (RHBZ#803664). */
+ goto skip_drive_letter_mappings;
+ /* errno != 0, so it's some other error from hivex */
+ perrorf (g, "hivex_node_get_child");
goto out;
}
@@ -453,6 +454,7 @@ check_windows_system_registry (guestfs_h *g, struct inspect_fs *fs)
free (key);
}
+ skip_drive_letter_mappings:;
/* Get the hostname. */
const char *hivepath[] =
{ fs->windows_current_control_set, "Services", "Tcpip", "Parameters" };