summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-04-21 17:29:44 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-04-21 17:29:44 +0100
commit782f3a36469ca396dbf998ea82af2699153be3ed (patch)
tree06634a4cbcb4e4e526b79d0b685a353c5f82cb9b
parent2b0ca7e7b8d369a42a51b1feec72ae8f17257c78 (diff)
downloadlibguestfs-782f3a36469ca396dbf998ea82af2699153be3ed.tar.gz
libguestfs-782f3a36469ca396dbf998ea82af2699153be3ed.tar.xz
libguestfs-782f3a36469ca396dbf998ea82af2699153be3ed.zip
list-applications: If software hive is missing, this is an error.
virt-inspector would exit silently if list-applications failed along this error path.
-rw-r--r--src/inspect_apps.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/inspect_apps.c b/src/inspect_apps.c
index d7634d81..a41c46c4 100644
--- a/src/inspect_apps.c
+++ b/src/inspect_apps.c
@@ -430,11 +430,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;