mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
We now return failed in FrLdrMapImage if the file could not be read.
FreeLDR ARM now loads properly, however, we need to start building the ARM kernel and ARM boot drivers, otherwise their relocations will have byte offsets which will lead to alignment errors (on ARM relocaitons are DWORD-aligned). Next steps are to get the kernel building, then the HAL, then bootvid/kdcom. svn path=/trunk/; revision=32176
This commit is contained in:
parent
9c1dc73ab3
commit
2c43803e7a
2 changed files with 10 additions and 4 deletions
|
@ -13,6 +13,7 @@
|
|||
/* GLOBALS ********************************************************************/
|
||||
|
||||
PARM_BOARD_CONFIGURATION_BLOCK ArmBoardBlock;
|
||||
ULONG BootDrive, BootPartition;
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
|
|
|
@ -492,13 +492,18 @@ FrLdrMapImage(IN FILE *Image,
|
|||
|
||||
/* Allocate a temporary buffer for the read */
|
||||
ReadBuffer = MmHeapAlloc(ImageSize);
|
||||
|
||||
|
||||
/* Load the file image */
|
||||
FsReadFile(Image, ImageSize, NULL, ReadBuffer);
|
||||
|
||||
if (!FsReadFile(Image, ImageSize, NULL, ReadBuffer))
|
||||
{
|
||||
/* Fail */
|
||||
DbgPrint("Failed to read image: %s\n", Name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Map it into virtual memory */
|
||||
ImageSize = FrLdrReMapImage(ReadBuffer, LoadBase);
|
||||
|
||||
|
||||
/* Free the temporary buffer */
|
||||
MmHeapFree(ReadBuffer);
|
||||
|
||||
|
|
Loading…
Reference in a new issue