diff --git a/rEFIt_UEFI/Platform/Nvram.cpp b/rEFIt_UEFI/Platform/Nvram.cpp index 4e1c9cf75..5774c15a9 100755 --- a/rEFIt_UEFI/Platform/Nvram.cpp +++ b/rEFIt_UEFI/Platform/Nvram.cpp @@ -964,9 +964,17 @@ LoadLatestNvramPlist() if (!EFI_ERROR(Status) && HandleCount > 0) { for (UINTN indexHandle = 0; indexHandle < HandleCount; indexHandle++) { RootDir = EfiLibOpenRoot(Handles[indexHandle]); + if ( RootDir == NULL ) { + DBG(" - [%lld] cannot open - skipping!\n", indexHandle); + continue; + } Status = RootDir->Open(RootDir, &FileHandle, L"nvram.plist", EFI_FILE_MODE_READ, 0); if (EFI_ERROR(Status)) { - DBG(" - [%lld] no nvram.plist - skipping!\n", indexHandle); + if ( Status == EFI_NOT_FOUND ) { + DBG(" - [%lld] no nvram.plist\n", indexHandle); + }else{ + DBG(" - [%lld] Cannot open nvram.plist - %s\n", indexHandle, efiStrError(Status)); + } continue; } FileInfo = EfiLibFileInfo(FileHandle); @@ -1077,7 +1085,7 @@ LoadLatestNvramPlist() // DBG(" nvram.plist not found!\n"); // } #endif - DBG("loaded Status=%s\n", efiStrError(Status)); + DBG("LoadLatestNvramPlist loaded Status=%s\n", efiStrError(Status)); return Status; } @@ -1096,7 +1104,7 @@ PutNvramPlistToRtVars () if (gNvramDict == NULL) { /*Status = */LoadLatestNvramPlist(); if (gNvramDict == NULL) { - DBG("PutNvramPlistToRtVars: nvram.plist not found\n"); + DBG("PutNvramPlistToRtVars: no nvram.plist\n"); return; } } diff --git a/rEFIt_UEFI/Settings/Self.cpp b/rEFIt_UEFI/Settings/Self.cpp index d53c32f90..28df68047 100644 --- a/rEFIt_UEFI/Settings/Self.cpp +++ b/rEFIt_UEFI/Settings/Self.cpp @@ -83,6 +83,9 @@ EFI_STATUS Self::_initialize() } m_efiFileName = m_CloverDirFullPath.basename(); +#ifdef JIEF_DEBUG + DBG("m_efiFileName=%ls\n", m_efiFileName.wc_str()); +#endif // History : if this Clover was started as BootX64.efi, redirect to /EFI/CLOVER if ( m_CloverDirFullPath.isEqualIC("\\EFI\\Boot\\BootX64.efi") ) { diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index 9e216ab11..9ada1562d 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -193,9 +193,9 @@ static EFI_STATUS LoadEFIImageList(IN EFI_DEVICE_PATH **DevicePaths, #ifdef JIEF_DEBUG EFI_LOADED_IMAGE_PROTOCOL* loadedBootImage = NULL; if (!EFI_ERROR(Status = gBS->HandleProtocol(ChildImageHandle, &gEfiLoadedImageProtocolGuid, (void**)(&loadedBootImage)))) { - DBG("%ls : Image base = 0x%llx", ImageTitle.wc_str(), (uintptr_t)loadedBootImage->ImageBase); // Jief : Do not change this, it's used by grep to feed the debugger + DBG("%ls : Image base = 0x%llx\n", ImageTitle.wc_str(), (uintptr_t)loadedBootImage->ImageBase); // Jief : Do not change this, it's used by grep to feed the debugger }else{ - DBG("Can't get loaded image protocol"); + DBG("Can't get loaded image protocol\n"); } #endif goto bailout;