From: Richard W.M. Jones Date: Thu, 21 Apr 2011 16:29:44 +0000 (+0100) Subject: list-applications: If software hive is missing, this is an error. X-Git-Tag: 1.8.7~2 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=df4dce74a887e013a6aec51e241a90cfb7d3b36a;p=libguestfs.git 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 and backported from commit 782f3a36469ca396dbf998ea82af2699153be3ed. --- diff --git a/src/inspect.c b/src/inspect.c index 900b6f4..370220b 100644 --- a/src/inspect.c +++ b/src/inspect.c @@ -2003,11 +2003,11 @@ list_applications_windows (guestfs_h *g, struct inspect_fs *fs) fs->windows_systemroot); char *software_path = case_sensitive_path_silently (g, software); - if (!software_path) - /* If the software hive doesn't exist, just accept that we cannot - * find product_name etc. - */ - 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 *apps = NULL, *ret = NULL; hive_h *h = NULL;