Include Hive in windows registry logs
authorCharles Giessen <charles@lunarg.com>
Fri, 5 May 2023 20:39:03 +0000 (14:39 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 29 May 2023 23:45:08 +0000 (17:45 -0600)
Which hive is being queried is useful information to have, this commit adds the
HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE hive strings to the appropriate log
messages.

loader/loader_windows.c

index f1f2d1c03a4def6d29198652522b873806b661e7..90c7094b6e755030f621a9a892405199770b73af 100644 (file)
@@ -556,7 +556,8 @@ VkResult windows_get_registry_files(const struct loader_instance *inst, char *lo
     }
 
     if (!found && result != VK_ERROR_OUT_OF_HOST_MEMORY) {
-        loader_log(inst, log_target_flag, 0, "Found no registry files in %s", location);
+        loader_log(inst, log_target_flag, 0, "Found no registry files in %s\\%s",
+                   (hive == DEFAULT_VK_REGISTRY_HIVE) ? DEFAULT_VK_REGISTRY_HIVE_STR : SECONDARY_VK_REGISTRY_HIVE_STR, location);
         result = VK_ERROR_INCOMPATIBLE_DRIVER;
     }
 
@@ -708,10 +709,12 @@ VkResult windows_read_data_files_in_registry(const struct loader_instance *inst,
 
     if (data_file_type == LOADER_DATA_FILE_MANIFEST_DRIVER) {
         log_target_flag = VULKAN_LOADER_DRIVER_BIT;
-        loader_log(inst, log_target_flag, 0, "Checking for Driver Manifest files in Registry at %s", registry_location);
+        loader_log(inst, log_target_flag, 0, "Checking for Driver Manifest files in Registry at %s\\%s",
+                   DEFAULT_VK_REGISTRY_HIVE_STR, registry_location);
     } else {
         log_target_flag = VULKAN_LOADER_LAYER_BIT;
-        loader_log(inst, log_target_flag, 0, "Checking for Layer Manifest files in Registry at %s", registry_location);
+        loader_log(inst, log_target_flag, 0, "Checking for Layer Manifest files in Registry at %s\\%s",
+                   DEFAULT_VK_REGISTRY_HIVE_STR, registry_location);
     }
 
     // These calls look at the PNP/Device section of the registry.