Add missing svn:eol-style=native properties

svn path=/trunk/; revision=28805
This commit is contained in:
Hervé Poussineau 2007-09-03 07:39:30 +00:00
parent 39ed067ac8
commit c0614ecb59
3 changed files with 19 additions and 18 deletions

View file

@ -26,8 +26,8 @@
// DATA
/////////////////////////////////////////////////////////////////////////////////////////////
ULONG FsType = 0; // Type of filesystem on boot device, set by FsOpenVolume()
PVOID FsStaticBufferDisk = 0, FsStaticBufferData = 0;
ULONG FsType = 0; // Type of filesystem on boot device, set by FsOpenVolume()
PVOID FsStaticBufferDisk = 0, FsStaticBufferData = 0;
/////////////////////////////////////////////////////////////////////////////////////////////
// FUNCTIONS
@ -52,20 +52,17 @@ static BOOLEAN FsOpenVolume(ULONG DriveNumber, ULONGLONG StartSector, ULONGLONG
{
CHAR ErrorText[80];
printf("FsOpenVolume: (disk=%d,start=%d,count=%d,type=%d)\n",
DriveNumber, StartSector, SectorCount, Type);
FsType = Type;
if( !FsStaticBufferDisk )
FsStaticBufferDisk = MmAllocateMemory( 0x20000 );
FsStaticBufferDisk = MmAllocateMemory( 0x20000 );
if( !FsStaticBufferDisk )
{
FileSystemError("could not allocate filesystem static buffer");
FileSystemError("could not allocate filesystem static buffer");
return FALSE;
}
FsStaticBufferData = ((PCHAR)FsStaticBufferDisk) + 0x10000;
switch (FsType)
{
case FS_FAT:
@ -165,7 +162,6 @@ PFILE FsOpenFile(PCSTR FileName)
break;
}
#ifdef DEBUG
//
// Check return value
//
@ -177,7 +173,6 @@ PFILE FsOpenFile(PCSTR FileName)
{
DbgPrint((DPRINT_FILESYSTEM, "FsOpenFile() failed.\n"));
}
#endif // defined DEBUG
return FileHandle;
}

View file

@ -90,7 +90,10 @@
/* Swap */
#include <bytesex.h>
/* arch defines */
#ifdef _X86_
#define Ke386EraseFlags(x) __asm__ __volatile__("pushl $0 ; popfl\n")
#endif
extern BOOLEAN UserInterfaceUp; /* Tells us if the user interface is displayed */

View file

@ -85,21 +85,24 @@ PVOID MmAllocateMemory(ULONG MemorySize)
// satisfy this allocation
PagesNeeded = ROUND_UP(MemorySize, MM_PAGE_SIZE) / MM_PAGE_SIZE;
#ifdef _M_PPC
{
// We don't have enough reserve, claim some memory from openfirmware
ULONG ptr;
ptr = ofw_claim(0,MemorySize,MM_PAGE_SIZE);
MemPointer = (PVOID)(ptr);
if (MemPointer)
return MemPointer;
}
#endif
// If we don't have enough available mem
// then return NULL
if (FreePagesInLookupTable < PagesNeeded)
{
#ifdef _M_PPC
ULONG ptr;
printf("Allocating %d bytes directly ...\n", MemorySize);
ptr = ofw_claim(0,MemorySize,MM_PAGE_SIZE);
MemPointer = (PVOID)(ptr);
return MemPointer;
#else
DbgPrint((DPRINT_MEMORY, "Memory allocation failed in MmAllocateMemory(). Not enough free memory to allocate %d bytes. AllocationCount: %d\n", MemorySize, AllocationCount));
UiMessageBoxCritical("Memory allocation failed: out of memory.");
return NULL;
#endif
}
FirstFreePageFromEnd = MmFindAvailablePages(PageLookupTableAddress, TotalPagesInLookupTable, PagesNeeded, AllocateFromEnd);