}\r
};\r
\r
+/**\r
+ Find the anchor volume descriptor pointer.\r
+\r
+ @param[in] BlockIo BlockIo interface.\r
+ @param[in] DiskIo DiskIo interface.\r
+ @param[out] AnchorPoint Anchor volume descriptor pointer.\r
+\r
+ @retval EFI_SUCCESS Anchor volume descriptor pointer found.\r
+ @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
+ @retval other Anchor volume descriptor pointer not found.\r
+\r
+**/\r
EFI_STATUS\r
FindAnchorVolumeDescriptorPointer (\r
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,\r
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath\r
)\r
{\r
+ UINT32 RemainderByMediaBlockSize;\r
EFI_STATUS Status;\r
EFI_BLOCK_IO_MEDIA *Media;\r
EFI_DEVICE_PATH_PROTOCOL *DevicePathNode;\r
//\r
// Check if UDF logical block size is multiple of underlying device block size\r
//\r
- if ((UDF_LOGICAL_SECTOR_SIZE % Media->BlockSize) != 0 ||\r
- Media->BlockSize > UDF_LOGICAL_SECTOR_SIZE) {\r
+ DivU64x32Remainder (\r
+ UDF_LOGICAL_SECTOR_SIZE, // Dividend\r
+ Media->BlockSize, // Divisor\r
+ &RemainderByMediaBlockSize // Remainder\r
+ );\r
+ if (RemainderByMediaBlockSize != 0) {\r
return EFI_NOT_FOUND;\r
}\r
\r