public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures
@ 2017-09-11  5:44 Dandan Bi
  2017-09-11  5:44 ` [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant expression in array Dandan Bi
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Dandan Bi @ 2017-09-11  5:44 UTC (permalink / raw)
  To: edk2-devel


Dandan Bi (3):
  MdeModulePkg/PartitionDxe: Don't use non-constant expression in array
    initialization
  MdeModulePkg/UdfDxe: Don't use non-constant expression in array
    initialization
  MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools

 MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c     |  93 +++++++++++++----
 .../Universal/Disk/UdfDxe/FileSystemOperations.c   | 111 +++++++++++++++------
 2 files changed, 153 insertions(+), 51 deletions(-)

-- 
1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant expression in array
  2017-09-11  5:44 [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Dandan Bi
@ 2017-09-11  5:44 ` Dandan Bi
  2017-09-11  6:08   ` Ni, Ruiyu
  2017-09-11  5:44 ` [patch 2/3] MdeModulePkg/UdfDxe: " Dandan Bi
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Dandan Bi @ 2017-09-11  5:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Paulo Alcantara, Ruiyu Ni, Star Zeng

Remove the DescriptorLBAs[] array with non-constant expression to fix
non-constant aggregate initializer warning in VS tool chains.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c | 93 ++++++++++++++++++++------
 1 file changed, 72 insertions(+), 21 deletions(-)

diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
index 3347b48..28385f0 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
@@ -46,34 +46,85 @@ FindAnchorVolumeDescriptorPointer (
   IN   EFI_DISK_IO_PROTOCOL                  *DiskIo,
   OUT  UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER  *AnchorPoint
   )
 {
   EFI_STATUS  Status;
-  UINT32      BlockSize = BlockIo->Media->BlockSize;
-  EFI_LBA     EndLBA = BlockIo->Media->LastBlock;
-  EFI_LBA     DescriptorLBAs[] = { 256, EndLBA - 256, EndLBA, 512 };
-  UINTN       Index;
+  UINT32      BlockSize;
+  EFI_LBA     EndLBA;
 
-  for (Index = 0; Index < ARRAY_SIZE (DescriptorLBAs); Index++) {
-    Status = DiskIo->ReadDisk (
-      DiskIo,
-      BlockIo->Media->MediaId,
-      MultU64x32 (DescriptorLBAs[Index], BlockSize),
-      sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
-      (VOID *)AnchorPoint
-      );
-    if (EFI_ERROR (Status)) {
-      return Status;
-    }
-    //
-    // Check if read LBA has a valid AVDP descriptor.
-    //
-    if (IS_AVDP (AnchorPoint)) {
-      return EFI_SUCCESS;
-    }
+  BlockSize = BlockIo->Media->BlockSize;
+  EndLBA = BlockIo->Media->LastBlock;
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (256, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+  //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (EndLBA - 256, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+  //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (EndLBA, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
   }
   //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (512, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+  //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  //
   // No AVDP found.
   //
   return EFI_VOLUME_CORRUPTED;
 }
 
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [patch 2/3] MdeModulePkg/UdfDxe: Don't use non-constant expression in array
  2017-09-11  5:44 [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Dandan Bi
  2017-09-11  5:44 ` [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant expression in array Dandan Bi
@ 2017-09-11  5:44 ` Dandan Bi
  2017-09-11  5:44 ` [patch 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools Dandan Bi
  2017-09-12  1:46 ` [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Paulo Alcantara
  3 siblings, 0 replies; 6+ messages in thread
From: Dandan Bi @ 2017-09-11  5:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Paulo Alcantara, Ruiyu Ni, Star Zeng

Remove the DescriptorLBAs[] array with non-constant expression to fix
non-constant aggregate initializer warning in VS tool chains.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../Universal/Disk/UdfDxe/FileSystemOperations.c   | 93 +++++++++++++++++-----
 1 file changed, 72 insertions(+), 21 deletions(-)

diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
index 0de9c71..03fda16 100644
--- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
+++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
@@ -20,34 +20,85 @@ FindAnchorVolumeDescriptorPointer (
   IN   EFI_DISK_IO_PROTOCOL                  *DiskIo,
   OUT  UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER  *AnchorPoint
   )
 {
   EFI_STATUS  Status;
-  UINT32      BlockSize = BlockIo->Media->BlockSize;
-  EFI_LBA     EndLBA = BlockIo->Media->LastBlock;
-  EFI_LBA     DescriptorLBAs[] = { 256, EndLBA - 256, EndLBA, 512 };
-  UINTN       Index;
+  UINT32      BlockSize;
+  EFI_LBA     EndLBA;
 
-  for (Index = 0; Index < ARRAY_SIZE (DescriptorLBAs); Index++) {
-    Status = DiskIo->ReadDisk (
-      DiskIo,
-      BlockIo->Media->MediaId,
-      MultU64x32 (DescriptorLBAs[Index], BlockSize),
-      sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
-      (VOID *)AnchorPoint
-      );
-    if (EFI_ERROR (Status)) {
-      return Status;
-    }
-    //
-    // Check if read LBA has a valid AVDP descriptor.
-    //
-    if (IS_AVDP (AnchorPoint)) {
-      return EFI_SUCCESS;
-    }
+  BlockSize = BlockIo->Media->BlockSize;
+  EndLBA = BlockIo->Media->LastBlock;
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (256, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+  //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (EndLBA - 256, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
   }
   //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (EndLBA, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+  //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  Status = DiskIo->ReadDisk (
+    DiskIo,
+    BlockIo->Media->MediaId,
+    MultU64x32 (512, BlockSize),
+    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
+    (VOID *)AnchorPoint
+    );
+  if (EFI_ERROR (Status)) {
+    return Status;
+  }
+  //
+  // Check if read LBA has a valid AVDP descriptor.
+  //
+  if (IS_AVDP (AnchorPoint)) {
+    return EFI_SUCCESS;
+  }
+
+  //
   // No AVDP found.
   //
   return EFI_VOLUME_CORRUPTED;
 }
 
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [patch 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools
  2017-09-11  5:44 [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Dandan Bi
  2017-09-11  5:44 ` [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant expression in array Dandan Bi
  2017-09-11  5:44 ` [patch 2/3] MdeModulePkg/UdfDxe: " Dandan Bi
@ 2017-09-11  5:44 ` Dandan Bi
  2017-09-12  1:46 ` [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Paulo Alcantara
  3 siblings, 0 replies; 6+ messages in thread
From: Dandan Bi @ 2017-09-11  5:44 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Paulo Alcantara, Ruiyu Ni, Star Zeng

Cc: Eric Dong <eric.dong@intel.com>
Cc: Paulo Alcantara <pcacjr@zytor.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
---
 .../Universal/Disk/UdfDxe/FileSystemOperations.c       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
index 03fda16..f4ebf1f 100644
--- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
+++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
@@ -521,11 +521,11 @@ DuplicateFid (
   OUT  UDF_FILE_IDENTIFIER_DESCRIPTOR  **NewFileIdentifierDesc
   )
 {
   *NewFileIdentifierDesc =
     (UDF_FILE_IDENTIFIER_DESCRIPTOR *)AllocateCopyPool (
-      GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc);
+      (UINTN) GetFidDescriptorLength (FileIdentifierDesc), FileIdentifierDesc);
 }
 
 //
 // Duplicate either a given File Entry or a given Extended File Entry.
 //
@@ -858,20 +858,20 @@ GetAedAdsData (
   }
 
   //
   // Allocate buffer to read in AED's data.
   //
-  *Data = AllocatePool (*Length);
+  *Data = AllocatePool ((UINTN) (*Length));
   if (*Data == NULL) {
     return EFI_OUT_OF_RESOURCES;
   }
 
   return DiskIo->ReadDisk (
     DiskIo,
     BlockIo->Media->MediaId,
     Offset,
-    *Length,
+    (UINTN) (*Length),
     *Data
     );
 }
 
 //
@@ -893,11 +893,11 @@ GrowUpBufferToNextAd (
     *Buffer = AllocatePool (ExtentLength);
     if (*Buffer == NULL) {
       return EFI_OUT_OF_RESOURCES;
     }
   } else {
-    *Buffer = ReallocatePool (Length, Length + ExtentLength, *Buffer);
+    *Buffer = ReallocatePool ((UINTN) Length, (UINTN) (Length + ExtentLength), *Buffer);
     if (*Buffer == NULL) {
       return EFI_OUT_OF_RESOURCES;
     }
   }
 
@@ -982,29 +982,29 @@ ReadFile (
       ReadFileInfo->ReadLength = Length;
     } else if (ReadFileInfo->Flags == READ_FILE_ALLOCATE_AND_READ) {
       //
       // Allocate buffer for starting read data.
       //
-      ReadFileInfo->FileData = AllocatePool (Length);
+      ReadFileInfo->FileData = AllocatePool ((UINTN) Length);
       if (ReadFileInfo->FileData == NULL) {
         return EFI_OUT_OF_RESOURCES;
       }
 
       //
       // Read all inline data into ReadFileInfo->FileData
       //
-      CopyMem (ReadFileInfo->FileData, Data, Length);
+      CopyMem (ReadFileInfo->FileData, Data, (UINTN) Length);
       ReadFileInfo->ReadLength = Length;
     } else if (ReadFileInfo->Flags == READ_FILE_SEEK_AND_READ) {
       //
       // If FilePosition is non-zero, seek file to FilePosition, read
       // FileDataSize bytes and then updates FilePosition.
       //
       CopyMem (
         ReadFileInfo->FileData,
         (VOID *)((UINT8 *)Data + ReadFileInfo->FilePosition),
-        ReadFileInfo->FileDataSize
+        (UINTN) ReadFileInfo->FileDataSize
         );
 
       ReadFileInfo->FilePosition += ReadFileInfo->FileDataSize;
     } else {
       ASSERT (FALSE);
@@ -1125,11 +1125,11 @@ ReadFile (
         }
 
         if (FilePosition + ExtentLength > ReadFileInfo->FilePosition) {
           Offset = ReadFileInfo->FilePosition - FilePosition;
           if (Offset < 0) {
-            Offset = -(Offset);
+            Offset = - (INT64) (Offset);
           }
         } else {
           Offset = 0;
         }
 
@@ -1153,11 +1153,11 @@ ReadFile (
         //
         Status = DiskIo->ReadDisk (
           DiskIo,
           BlockIo->Media->MediaId,
           Offset + MultU64x32 (Lsn, LogicalBlockSize),
-          DataLength,
+          (UINTN) DataLength,
           (VOID *)((UINT8 *)ReadFileInfo->FileData +
                    DataOffset)
           );
         if (EFI_ERROR (Status)) {
           goto Error_Read_Disk_Blk;
-- 
1.9.5.msysgit.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant expression in array
  2017-09-11  5:44 ` [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant expression in array Dandan Bi
@ 2017-09-11  6:08   ` Ni, Ruiyu
  0 siblings, 0 replies; 6+ messages in thread
From: Ni, Ruiyu @ 2017-09-11  6:08 UTC (permalink / raw)
  To: Bi, Dandan, edk2-devel@lists.01.org
  Cc: Dong, Eric, Paulo Alcantara, Zeng, Star

Dandan,
Thanks for fixing this.
But, why not write code as below?
EFI_LBA     DescriptorLBAs[4];

DescriptorLBA[0] = 256;
DescriptorLBA[1] = EndLBA - 256;
...
 
Thanks/Ray

> -----Original Message-----
> From: Bi, Dandan
> Sent: Monday, September 11, 2017 1:45 PM
> To: edk2-devel@lists.01.org
> Cc: Dong, Eric <eric.dong@intel.com>; Paulo Alcantara <pcacjr@zytor.com>;
> Ni, Ruiyu <ruiyu.ni@intel.com>; Zeng, Star <star.zeng@intel.com>
> Subject: [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant
> expression in array
> 
> Remove the DescriptorLBAs[] array with non-constant expression to fix non-
> constant aggregate initializer warning in VS tool chains.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Paulo Alcantara <pcacjr@zytor.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> Cc: Star Zeng <star.zeng@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Dandan Bi <dandan.bi@intel.com>
> ---
>  MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c | 93
> ++++++++++++++++++++------
>  1 file changed, 72 insertions(+), 21 deletions(-)
> 
> diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
> b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
> index 3347b48..28385f0 100644
> --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
> +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
> @@ -46,34 +46,85 @@ FindAnchorVolumeDescriptorPointer (
>    IN   EFI_DISK_IO_PROTOCOL                  *DiskIo,
>    OUT  UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER  *AnchorPoint
>    )
>  {
>    EFI_STATUS  Status;
> -  UINT32      BlockSize = BlockIo->Media->BlockSize;
> -  EFI_LBA     EndLBA = BlockIo->Media->LastBlock;
> -  EFI_LBA     DescriptorLBAs[] = { 256, EndLBA - 256, EndLBA, 512 };
> -  UINTN       Index;
> +  UINT32      BlockSize;
> +  EFI_LBA     EndLBA;
> 
> -  for (Index = 0; Index < ARRAY_SIZE (DescriptorLBAs); Index++) {
> -    Status = DiskIo->ReadDisk (
> -      DiskIo,
> -      BlockIo->Media->MediaId,
> -      MultU64x32 (DescriptorLBAs[Index], BlockSize),
> -      sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
> -      (VOID *)AnchorPoint
> -      );
> -    if (EFI_ERROR (Status)) {
> -      return Status;
> -    }
> -    //
> -    // Check if read LBA has a valid AVDP descriptor.
> -    //
> -    if (IS_AVDP (AnchorPoint)) {
> -      return EFI_SUCCESS;
> -    }
> +  BlockSize = BlockIo->Media->BlockSize;  EndLBA =
> + BlockIo->Media->LastBlock;
> +
> +  Status = DiskIo->ReadDisk (
> +    DiskIo,
> +    BlockIo->Media->MediaId,
> +    MultU64x32 (256, BlockSize),
> +    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
> +    (VOID *)AnchorPoint
> +    );
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +  //
> +  // Check if read LBA has a valid AVDP descriptor.
> +  //
> +  if (IS_AVDP (AnchorPoint)) {
> +    return EFI_SUCCESS;
> +  }
> +
> +  Status = DiskIo->ReadDisk (
> +    DiskIo,
> +    BlockIo->Media->MediaId,
> +    MultU64x32 (EndLBA - 256, BlockSize),
> +    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
> +    (VOID *)AnchorPoint
> +    );
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +  //
> +  // Check if read LBA has a valid AVDP descriptor.
> +  //
> +  if (IS_AVDP (AnchorPoint)) {
> +    return EFI_SUCCESS;
> +  }
> +
> +  Status = DiskIo->ReadDisk (
> +    DiskIo,
> +    BlockIo->Media->MediaId,
> +    MultU64x32 (EndLBA, BlockSize),
> +    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
> +    (VOID *)AnchorPoint
> +    );
> +  if (EFI_ERROR (Status)) {
> +    return Status;
>    }
>    //
> +  // Check if read LBA has a valid AVDP descriptor.
> +  //
> +  if (IS_AVDP (AnchorPoint)) {
> +    return EFI_SUCCESS;
> +  }
> +
> +  Status = DiskIo->ReadDisk (
> +    DiskIo,
> +    BlockIo->Media->MediaId,
> +    MultU64x32 (512, BlockSize),
> +    sizeof (UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER),
> +    (VOID *)AnchorPoint
> +    );
> +  if (EFI_ERROR (Status)) {
> +    return Status;
> +  }
> +  //
> +  // Check if read LBA has a valid AVDP descriptor.
> +  //
> +  if (IS_AVDP (AnchorPoint)) {
> +    return EFI_SUCCESS;
> +  }
> +
> +  //
>    // No AVDP found.
>    //
>    return EFI_VOLUME_CORRUPTED;
>  }
> 
> --
> 1.9.5.msysgit.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures
  2017-09-11  5:44 [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Dandan Bi
                   ` (2 preceding siblings ...)
  2017-09-11  5:44 ` [patch 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools Dandan Bi
@ 2017-09-12  1:46 ` Paulo Alcantara
  3 siblings, 0 replies; 6+ messages in thread
From: Paulo Alcantara @ 2017-09-12  1:46 UTC (permalink / raw)
  To: Dandan Bi, edk2-devel

Dandan,

On 11/09/2017 02:44, Dandan Bi wrote:
> 
> Dandan Bi (3):
>    MdeModulePkg/PartitionDxe: Don't use non-constant expression in array
>      initialization
>    MdeModulePkg/UdfDxe: Don't use non-constant expression in array
>      initialization
>    MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools
> 
>   MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c     |  93 +++++++++++++----
>   .../Universal/Disk/UdfDxe/FileSystemOperations.c   | 111 +++++++++++++++------
>   2 files changed, 153 insertions(+), 51 deletions(-)
> 

Looks good to me. Thanks!

Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>

Paulo


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-12  1:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11  5:44 [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Dandan Bi
2017-09-11  5:44 ` [patch 1/3] MdeModulePkg/PartitionDxe: Don't use non-constant expression in array Dandan Bi
2017-09-11  6:08   ` Ni, Ruiyu
2017-09-11  5:44 ` [patch 2/3] MdeModulePkg/UdfDxe: " Dandan Bi
2017-09-11  5:44 ` [patch 3/3] MdeModulePkg/UdfDxe: Add type cast to fix build failure in VS tools Dandan Bi
2017-09-12  1:46 ` [patch 0/3] MdeModulePkg/Udf: Fix VS tool chain build failures Paulo Alcantara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox