Changeset 81600 in vbox for trunk/src/VBox/Devices/EFI
- Timestamp:
- Oct 30, 2019 8:58:44 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxApfsJmpStartDxe/VBoxApfsJmpStartDxe.c
r81598 r81600 116 116 static EFI_STATUS vboxApfsJmpStartLoadAndExecEfiDriver(IN PAPFSJMPSTARTCTX pCtx, IN PCAPFSNXSUPERBLOCK pSb) 117 117 { 118 uint32_tcbReadLeft = RT_LE2H_U32(pCtx->JmpStart.Hdr.cbEfiFile);118 UINTN cbReadLeft = RT_LE2H_U32(pCtx->JmpStart.Hdr.cbEfiFile); 119 119 EFI_STATUS rc = EFI_SUCCESS; 120 120 … … 122 122 if (pvApfsDrv) 123 123 { 124 uint32_t i = 0; 124 125 uint8_t *pbBuf = (uint8_t *)pvApfsDrv; 125 126 126 for ( uint32_ti = 0; i < RT_LE2H_U32(pCtx->JmpStart.Hdr.cExtents) && !EFI_ERROR(rc) && cbReadLeft; i++)127 for (i = 0; i < RT_LE2H_U32(pCtx->JmpStart.Hdr.cExtents) && !EFI_ERROR(rc) && cbReadLeft; i++) 127 128 { 128 129 PCAPFSPRANGE pRange = &pCtx->JmpStart.aExtents[i]; 129 size_tcbRead = RT_MIN(cbReadLeft, RT_LE2H_U64(pRange->cBlocks) * pCtx->cbBlock);130 UINTN cbRead = RT_MIN(cbReadLeft, RT_LE2H_U64(pRange->cBlocks) * pCtx->cbBlock); 130 131 131 132 rc = vboxApfsJmpStartRead(pCtx, RT_LE2H_U64(pRange->PAddrStart), pbBuf, cbRead); … … 247 248 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL) 248 249 { 250 APFSJMPSTARTCTX Ctx; 251 249 252 /* Check whether the driver was already loaded from this controller. */ 250 253 EFI_STATUS rc = gBS->OpenProtocol(ControllerHandle, … … 257 260 return EFI_UNSUPPORTED; 258 261 259 APFSJMPSTARTCTX Ctx;260 262 Ctx.cbBlock = 0; /* Will get filled when the superblock was read (starting at 0 anyway). */ 261 263 Ctx.hController = ControllerHandle;
Note:
See TracChangeset
for help on using the changeset viewer.