]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/FvbServicesRuntimeDxe/FWBlockService.c
MdeModulePkg: Add UdfDxe to the dsc file
[mirror_edk2.git] / Nt32Pkg / FvbServicesRuntimeDxe / FWBlockService.c
index 2028c606ab8836412365f3ae56b9493bf46b3bc1..03f1f44dafde5b3145f86859cb1d439f3ccdbd67 100644 (file)
@@ -1,6 +1,6 @@
 /**@file\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2013, 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
@@ -945,19 +945,15 @@ Returns:
       break;\r
     }\r
 \r
-    NumOfLba = VA_ARG (args, UINT32);\r
+    NumOfLba = VA_ARG (args, UINTN);\r
 \r
     //\r
     // Check input parameters\r
     //\r
-    if (NumOfLba == 0) {\r
+    if ((NumOfLba == 0) || ((StartingLba + NumOfLba) > NumOfBlocks)) {\r
       VA_END (args);\r
       return EFI_INVALID_PARAMETER;\r
     }\r
-\r
-    if ((StartingLba + NumOfLba) > NumOfBlocks) {\r
-      return EFI_INVALID_PARAMETER;\r
-    }\r
   } while (1);\r
 \r
   VA_END (args);\r
@@ -969,7 +965,7 @@ Returns:
       break;\r
     }\r
 \r
-    NumOfLba = VA_ARG (args, UINT32);\r
+    NumOfLba = VA_ARG (args, UINTN);\r
 \r
     while (NumOfLba > 0) {\r
       Status = FvbEraseBlock (FvbDevice->Instance, StartingLba, mFvbModuleGlobal, EfiGoneVirtual ());\r
@@ -1339,7 +1335,7 @@ Returns:
                       &gEfiFirmwareVolumeBlockProtocolGuid,\r
                       &FvbDevice->FwVolBlockInstance,\r
                       &gEfiDevicePathProtocolGuid,\r
-                      &FvbDevice->DevicePath,\r
+                      FvbDevice->DevicePath,\r
                       NULL\r
                       );\r
       ASSERT_EFI_ERROR (Status);\r