From c9858f7fb77cedf4c607755dc80cc7f6c2cd78e6 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 21 Apr 2011 17:29:44 +0100 Subject: [PATCH] list-applications: If software hive is missing, this is an error. virt-inspector would exit silently if list-applications failed along this error path. (cherry picked from commit 782f3a36469ca396dbf998ea82af2699153be3ed) --- src/inspect_apps.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/inspect_apps.c b/src/inspect_apps.c index 8ce09ab..dad5d0b 100644 --- a/src/inspect_apps.c +++ b/src/inspect_apps.c @@ -287,11 +287,11 @@ list_applications_windows (guestfs_h *g, struct inspect_fs *fs) fs->windows_systemroot); char *software_path = guestfs___case_sensitive_path_silently (g, software); - if (!software_path) - /* If the software hive doesn't exist, just accept that we cannot - * list windows apps. - */ - return 0; + if (!software_path) { + /* Missing software hive is a problem. */ + error (g, "no HKLM\\SOFTWARE hive found in the guest"); + return NULL; + } struct guestfs_application_list *ret = NULL; hive_h *h = NULL; -- 1.8.3.1