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:
ReactOS Portable Systems Group 2008-02-07 05:25:37 +00:00
parent 9c1dc73ab3
commit 2c43803e7a
2 changed files with 10 additions and 4 deletions

View file

@ -13,6 +13,7 @@
/* GLOBALS ********************************************************************/
PARM_BOARD_CONFIGURATION_BLOCK ArmBoardBlock;
ULONG BootDrive, BootPartition;
/* FUNCTIONS ******************************************************************/

View file

@ -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);