]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c
ShellPkg: Add type cast to avoid build failure in VS2005.
[mirror_edk2.git] / OvmfPkg / QemuFlashFvbServicesRuntimeDxe / FwBlockService.c
index 2ae667875128261c7a9e7bc36518fd6f496e6e3a..b56ece3931ed6693b73c9bc17b95e72c94bee7fd 100644 (file)
@@ -1,6 +1,6 @@
 /**@file\r
 \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -197,6 +197,7 @@ Returns:
 {\r
   EFI_FW_VOL_INSTANCE *FwhRecord;\r
 \r
+  *FwhInstance = NULL;\r
   if (Instance >= Global->NumFv) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -879,7 +880,8 @@ Returns:
   if (Checksum != 0) {\r
     UINT16 Expected;\r
 \r
-    Expected = ((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff;\r
+    Expected =\r
+      (UINT16) (((UINTN) FwVolHeader->Checksum + 0x10000 - Checksum) & 0xffff);\r
 \r
     DEBUG ((EFI_D_INFO, "FV@%p Checksum is 0x%x, expected 0x%x\n",\r
             FwVolHeader, FwVolHeader->Checksum, Expected));\r
@@ -1222,5 +1224,6 @@ Returns:
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  PcdSetBool (PcdOvmfFlashVariablesEnable, TRUE);\r
   return EFI_SUCCESS;\r
 }\r