Author: rharabien
Date: Sun Jul 3 23:01:39 2011
New Revision: 52526
URL:
http://svn.reactos.org/svn/reactos?rev=52526&view=rev
Log:
[FREELDR]
- Fix all MSVC warnings
Modified:
trunk/reactos/boot/freeldr/freeldr/arcemul/mm.c
trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S
trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S
trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S
trunk/reactos/boot/freeldr/freeldr/arch/i386/halstub.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c
trunk/reactos/boot/freeldr/freeldr/cache/cache.c
trunk/reactos/boot/freeldr/freeldr/disk/disk.c
trunk/reactos/boot/freeldr/freeldr/disk/partition.c
trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
trunk/reactos/boot/freeldr/freeldr/freeldr.c
trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
trunk/reactos/boot/freeldr/freeldr/fs/fat.c
trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
trunk/reactos/boot/freeldr/freeldr/include/arch/i386/drivemap.h
trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h
trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h
trunk/reactos/boot/freeldr/freeldr/include/cache.h
trunk/reactos/boot/freeldr/freeldr/include/disk.h
trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h
trunk/reactos/boot/freeldr/freeldr/include/machine.h
trunk/reactos/boot/freeldr/freeldr/include/mm.h
trunk/reactos/boot/freeldr/freeldr/include/reactos.h
trunk/reactos/boot/freeldr/freeldr/machine.c
trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c
trunk/reactos/boot/freeldr/freeldr/video/fade.c
trunk/reactos/boot/freeldr/freeldr/video/palette.c
trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c
Modified: trunk/reactos/boot/freeldr/freeldr/arcemul/mm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arcem…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arcemul/mm.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arcemul/mm.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -77,8 +77,8 @@
// Copy this memory descriptor
//
BiosMemoryDescriptors[j].m.MemoryType = MemoryFree;
- BiosMemoryDescriptors[j].m.BasePage = BiosMemoryMap[i].BaseAddress /
MM_PAGE_SIZE;
- BiosMemoryDescriptors[j].m.PageCount = BiosMemoryMap[i].Length /
MM_PAGE_SIZE;
+ BiosMemoryDescriptors[j].m.BasePage = (ULONG)(BiosMemoryMap[i].BaseAddress /
MM_PAGE_SIZE);
+ BiosMemoryDescriptors[j].m.PageCount = (ULONG)(BiosMemoryMap[i].Length /
MM_PAGE_SIZE);
BiosMemoryDescriptors[j].Index = j;
BiosMemoryDescriptors[j].GeneratedDescriptor = TRUE;
j++;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/arch.S [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -28,9 +28,8 @@
/* Setup a real mode stack */
mov sp, stack16
- /* Zero BootDrive and BootPartition */
+ /* Zero BootPartition */
xor eax, eax
- mov FrldrBootDrive, eax
mov FrldrBootPartition, eax
/* Store the boot drive */
@@ -408,7 +407,7 @@
.global FrldrBootDrive
FrldrBootDrive:
- .long 0
+ .byte 0
.global FrldrBootPartition
FrldrBootPartition:
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/arch.S [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -47,9 +47,8 @@
.code32
- /* Zero BootDrive and BootPartition */
+ /* Zero BootPartition */
xor eax, eax
- mov dword ptr [_FrldrBootDrive], eax
mov dword ptr [_FrldrBootPartition], eax
/* Store the boot drive */
@@ -498,7 +497,7 @@
.fill CMDLINE_SIZE, 1, 0
EXTERN(_FrldrBootDrive)
- .long 0
+ .byte 0
EXTERN(_FrldrBootPartition)
.long 0
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/drivemap.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -144,9 +144,9 @@
}
#endif
-ULONG DriveMapGetBiosDriveNumber(PCSTR DeviceName)
-{
- ULONG BiosDriveNumber = 0;
+UCHAR DriveMapGetBiosDriveNumber(PCSTR DeviceName)
+{
+ UCHAR BiosDriveNumber = 0;
// If they passed in a number string then just
// convert it to decimal and return it
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -58,9 +58,8 @@
_FrldrStartup:
/* Store BootDrive and BootPartition */
- xor eax, eax
- mov al, dl
- mov dword ptr ds:[_FrldrBootDrive], eax
+ mov byte ptr ds:[_FrldrBootDrive], dl
+ xor eax, eax
mov al, dh
mov dword ptr ds:[_FrldrBootPartition], eax
@@ -294,7 +293,7 @@
PUBLIC _FrldrBootDrive
_FrldrBootDrive:
- .long 0
+ .byte 0
PUBLIC _FrldrBootPartition
_FrldrBootPartition:
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/halstub.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/halstub.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/halstub.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -33,7 +33,7 @@
xHalVectorToIDTEntry(IN ULONG Vector)
{
/* Return the vector */
- return Vector;
+ return (UCHAR)Vector;
}
VOID
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -323,7 +323,7 @@
static PCM_PARTIAL_RESOURCE_LIST
-GetHarddiskConfigurationData(ULONG DriveNumber, ULONG* pSize)
+GetHarddiskConfigurationData(UCHAR DriveNumber, ULONG* pSize)
{
PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry;
@@ -400,7 +400,7 @@
typedef struct tagDISKCONTEXT
{
- ULONG DriveNumber;
+ UCHAR DriveNumber;
ULONG SectorSize;
ULONGLONG SectorOffset;
ULONGLONG SectorCount;
@@ -421,7 +421,7 @@
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
Information->EndingAddress.QuadPart = (Context->SectorOffset +
Context->SectorCount) * Context->SectorSize;
- Information->CurrentAddress.LowPart = (Context->SectorOffset +
Context->SectorNumber) * Context->SectorSize;
+ Information->CurrentAddress.QuadPart = (Context->SectorOffset +
Context->SectorNumber) * Context->SectorSize;
return ESUCCESS;
}
@@ -429,7 +429,8 @@
static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
DISKCONTEXT* Context;
- ULONG DriveNumber, DrivePartition, SectorSize;
+ UCHAR DriveNumber;
+ ULONG DrivePartition, SectorSize;
ULONGLONG SectorOffset = 0;
ULONGLONG SectorCount = 0;
PARTITION_TABLE_ENTRY PartitionTableEntry;
@@ -527,7 +528,7 @@
static VOID
GetHarddiskIdentifier(PCHAR Identifier,
- ULONG DriveNumber)
+ UCHAR DriveNumber)
{
PMASTER_BOOT_RECORD Mbr;
ULONG *Buffer;
@@ -568,7 +569,7 @@
reactos_arc_strings[reactos_disk_count];
reactos_disk_count++;
- sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(0)", DriveNumber -
0x80);
+ sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber -
0x80);
FsRegisterDevice(ArcName, &DiskVtbl);
/* Add partitions */
@@ -578,7 +579,7 @@
{
if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED)
{
- sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(%lu)", DriveNumber -
0x80, i);
+ sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(%lu)", DriveNumber -
0x80, i);
FsRegisterDevice(ArcName, &DiskVtbl);
}
i++;
@@ -609,7 +610,7 @@
DPRINTM(DPRINT_HWDETECT, "Identifier: %s\n", Identifier);
}
-static ULONG
+static UCHAR
GetFloppyCount(VOID)
{
UCHAR Data;
@@ -657,7 +658,7 @@
CHAR Identifier[20];
PCONFIGURATION_COMPONENT_DATA PeripheralKey;
ULONG Size;
- ULONG FloppyNumber;
+ UCHAR FloppyNumber;
UCHAR FloppyType;
ULONG MaxDensity[6] = {0, 360, 1200, 720, 1440, 2880};
PUCHAR Ptr;
@@ -674,7 +675,7 @@
Ptr = GetInt1eTable();
/* Set 'Identifier' value */
- sprintf(Identifier, "FLOPPY%ld", FloppyNumber + 1);
+ sprintf(Identifier, "FLOPPY%d", FloppyNumber + 1);
Size = sizeof(CM_PARTIAL_RESOURCE_LIST) +
sizeof(CM_FLOPPY_DEVICE_DATA);
@@ -804,9 +805,8 @@
PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
PCM_INT13_DRIVE_PARAMETER Int13Drives;
GEOMETRY Geometry;
- ULONG DiskCount;
+ UCHAR DiskCount, i;
ULONG Size;
- ULONG i;
BOOLEAN Changed;
/* Count the number of visible drives */
@@ -869,8 +869,8 @@
{
Int13Drives[i].DriveSelect = 0x80 + i;
Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1;
- Int13Drives[i].SectorsPerTrack = Geometry.Sectors;
- Int13Drives[i].MaxHeads = Geometry.Heads - 1;
+ Int13Drives[i].SectorsPerTrack = (USHORT)Geometry.Sectors;
+ Int13Drives[i].MaxHeads = (USHORT)Geometry.Heads - 1;
Int13Drives[i].NumberDrives = DiskCount;
DPRINTM(DPRINT_HWDETECT,
@@ -899,12 +899,12 @@
return SystemKey;
}
-static ULONG
+static UCHAR
GetDiskCount(PCONFIGURATION_COMPONENT_DATA BusKey)
{
PCONFIGURATION_COMPONENT_DATA System;
ULONG ConfigurationDataLength;
- ULONG DiskCount = 0;
+ UCHAR DiskCount = 0;
//
// Get root component
@@ -924,8 +924,8 @@
// by n entries of CM_INT13_DRIVE_PARAMETER
//
if (ConfigurationDataLength > 0)
- DiskCount = (ConfigurationDataLength - sizeof(CM_PARTIAL_RESOURCE_LIST))
- / sizeof(CM_INT13_DRIVE_PARAMETER);
+ DiskCount = (UCHAR)((ConfigurationDataLength - sizeof(CM_PARTIAL_RESOURCE_LIST))
+ / sizeof(CM_INT13_DRIVE_PARAMETER));
//
// Return number of disks
@@ -940,7 +940,7 @@
PCONFIGURATION_COMPONENT_DATA DiskKey, ControllerKey;
BOOLEAN BootDriveReported = FALSE;
ULONG i;
- ULONG DiskCount = GetDiskCount(BusKey);
+ UCHAR DiskCount = GetDiskCount(BusKey);
CHAR BootPath[512];
FldrCreateComponentKey(BusKey,
@@ -961,13 +961,14 @@
PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
ULONG Size;
CHAR Identifier[20];
-
- if (FrldrBootDrive == 0x80 + i)
+ UCHAR DriveNumber = 0x80 + (UCHAR)i;
+
+ if (FrldrBootDrive == DriveNumber)
BootDriveReported = TRUE;
/* Get disk values */
- PartialResourceList = GetHarddiskConfigurationData(0x80 + i, &Size);
- GetHarddiskIdentifier(Identifier, 0x80 + i);
+ PartialResourceList = GetHarddiskConfigurationData(DriveNumber, &Size);
+ GetHarddiskIdentifier(Identifier, DriveNumber);
/* Create disk key */
FldrCreateComponentKey(ControllerKey,
@@ -1020,7 +1021,7 @@
static VOID
InitializeSerialPort(PUCHAR Port,
- ULONG LineControl)
+ UCHAR LineControl)
{
WRITE_PORT_UCHAR(Port + 3, 0x80); /* set DLAB on */
WRITE_PORT_UCHAR(Port, 0x60); /* speed LO byte */
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -26,7 +26,7 @@
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
-BOOLEAN DiskResetController(ULONG DriveNumber)
+BOOLEAN DiskResetController(UCHAR DriveNumber)
{
REGS RegsIn;
REGS RegsOut;
@@ -49,9 +49,9 @@
return INT386_SUCCESS(RegsOut);
}
-BOOLEAN DiskInt13ExtensionsSupported(ULONG DriveNumber)
-{
- static ULONG LastDriveNumber = 0xffffffff;
+BOOLEAN DiskInt13ExtensionsSupported(UCHAR DriveNumber)
+{
+ static UCHAR LastDriveNumber = 0xff;
static BOOLEAN LastSupported;
REGS RegsIn;
REGS RegsOut;
@@ -141,7 +141,7 @@
WRITE_PORT_UCHAR((PUCHAR)0x3F2, 0);
}
-BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT
BufferSize)
+BOOLEAN DiskGetExtendedDriveParameters(UCHAR DriveNumber, PVOID Buffer, USHORT
BufferSize)
{
REGS RegsIn;
REGS RegsOut;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -85,7 +85,7 @@
CHAR SettingValue[80];
ULONG SectionId;
PARTITION_TABLE_ENTRY PartitionTableEntry;
- ULONG DriveNumber;
+ UCHAR DriveNumber;
ULONG PartitionNumber;
// Find all the message box settings and run them
@@ -156,7 +156,7 @@
CHAR SettingName[80];
CHAR SettingValue[80];
ULONG SectionId;
- ULONG DriveNumber;
+ UCHAR DriveNumber;
// Find all the message box settings and run them
UiShowMessageBoxesInSection(OperatingSystemName);
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -42,7 +42,7 @@
// FUNCTIONS
/////////////////////////////////////////////////////////////////////////////////////////////
-static BOOLEAN PcDiskResetController(ULONG DriveNumber)
+static BOOLEAN PcDiskResetController(UCHAR DriveNumber)
{
REGS RegsIn;
REGS RegsOut;
@@ -65,7 +65,7 @@
return INT386_SUCCESS(RegsOut);
}
-static BOOLEAN PcDiskReadLogicalSectorsLBA(ULONG DriveNumber, ULONGLONG SectorNumber,
ULONG SectorCount, PVOID Buffer)
+static BOOLEAN PcDiskReadLogicalSectorsLBA(UCHAR DriveNumber, ULONGLONG SectorNumber,
ULONG SectorCount, PVOID Buffer)
{
REGS RegsIn;
REGS RegsOut;
@@ -73,6 +73,7 @@
PI386_DISK_ADDRESS_PACKET Packet = (PI386_DISK_ADDRESS_PACKET)(BIOSCALLBUFFER);
DPRINTM(DPRINT_DISK, "PcDiskReadLogicalSectorsLBA() DriveNumber: 0x%x SectorNumber:
%I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount,
Buffer);
+ ASSERT(((ULONG_PTR)Buffer) <= 0xFFFFF);
// BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
RegsIn.b.ah = 0x42; // Subfunction 42h
@@ -84,9 +85,11 @@
RtlZeroMemory(Packet, sizeof(I386_DISK_ADDRESS_PACKET));
Packet->PacketSize = sizeof(I386_DISK_ADDRESS_PACKET);
Packet->Reserved = 0;
- Packet->LBABlockCount = SectorCount;
+ Packet->LBABlockCount = (USHORT)SectorCount;
+ ASSERT(Packet->LBABlockCount == SectorCount);
+ DbgPrint("here\n");
Packet->TransferBufferOffset = ((ULONG_PTR)Buffer) & 0x0F;
- Packet->TransferBufferSegment = ((ULONG_PTR)Buffer) >> 4;
+ Packet->TransferBufferSegment = (USHORT)(((ULONG_PTR)Buffer) >> 4);
Packet->LBAStartBlock = SectorNumber;
// BIOS int 0x13, function 42h - IBM/MS INT 13 Extensions - EXTENDED READ
@@ -100,17 +103,17 @@
// Retry 3 times
for (RetryCount=0; RetryCount<3; RetryCount++)
- {
+ {DPRINTM(DPRINT_DISK, "retry\n");
Int386(0x13, &RegsIn, &RegsOut);
// If it worked return TRUE
if (INT386_SUCCESS(RegsOut))
- {
+ {DPRINTM(DPRINT_DISK, "PcDiskReadLogicalSectorsLBA() success\n");
return TRUE;
}
// If it was a corrected ECC error then the data is still good
else if (RegsOut.b.ah == 0x11)
- {
+ {DPRINTM(DPRINT_DISK, "PcDiskReadLogicalSectorsLBA() success\n");
return TRUE;
}
// If it failed the do the next retry
@@ -128,10 +131,10 @@
return FALSE;
}
-static BOOLEAN PcDiskReadLogicalSectorsCHS(ULONG DriveNumber, ULONGLONG SectorNumber,
ULONG SectorCount, PVOID Buffer)
-{
- ULONG PhysicalSector;
- ULONG PhysicalHead;
+static BOOLEAN PcDiskReadLogicalSectorsCHS(UCHAR DriveNumber, ULONGLONG SectorNumber,
ULONG SectorCount, PVOID Buffer)
+{
+ UCHAR PhysicalSector;
+ UCHAR PhysicalHead;
ULONG PhysicalTrack;
GEOMETRY DriveGeometry;
ULONG NumberOfSectorsToRead;
@@ -156,10 +159,11 @@
//
// Calculate the physical disk offsets
- //
- PhysicalSector = 1 + (SectorNumber % DriveGeometry.Sectors);
- PhysicalHead = (SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads;
- PhysicalTrack = (SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads;
+ // Note: DriveGeometry.Sectors < 64
+ //
+ PhysicalSector = 1 + (UCHAR)(SectorNumber % DriveGeometry.Sectors);
+ PhysicalHead = (UCHAR)((SectorNumber / DriveGeometry.Sectors) % DriveGeometry.Heads);
+ PhysicalTrack = (ULONG)((SectorNumber / DriveGeometry.Sectors) / DriveGeometry.Heads);
//
// Calculate how many sectors we need to read this round
@@ -208,12 +212,12 @@
// AL = number of sectors transferred
// (only valid if CF set for some BIOSes)
RegsIn.b.ah = 0x02;
- RegsIn.b.al = NumberOfSectorsToRead;
+ RegsIn.b.al = (UCHAR)NumberOfSectorsToRead;
RegsIn.b.ch = (PhysicalTrack & 0xFF);
- RegsIn.b.cl = (PhysicalSector + ((PhysicalTrack & 0x300) >> 2));
+ RegsIn.b.cl = (UCHAR)(PhysicalSector + ((PhysicalTrack & 0x300) >> 2));
RegsIn.b.dh = PhysicalHead;
RegsIn.b.dl = DriveNumber;
- RegsIn.w.es = ((ULONG_PTR)Buffer) >> 4;
+ RegsIn.w.es = (USHORT)(((ULONG_PTR)Buffer) >> 4);
RegsIn.w.bx = ((ULONG_PTR)Buffer) & 0x0F;
//
@@ -264,7 +268,7 @@
return TRUE;
}
-BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer)
+BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer)
{
DPRINTM(DPRINT_DISK, "PcDiskReadLogicalSectors() DriveNumber: 0x%x SectorNumber:
%I64d SectorCount: %d Buffer: 0x%x\n", DriveNumber, SectorNumber, SectorCount,
Buffer);
@@ -294,7 +298,7 @@
}
BOOLEAN
-PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry)
+PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
{
REGS RegsIn;
REGS RegsOut;
@@ -345,7 +349,7 @@
}
ULONG
-PcDiskGetCacheableBlockCount(ULONG DriveNumber)
+PcDiskGetCacheableBlockCount(UCHAR DriveNumber)
{
GEOMETRY Geometry;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -108,7 +108,7 @@
} SVGA_MODE_INFORMATION, *PSVGA_MODE_INFORMATION;
#include <poppack.h>
-static ULONG BiosVideoMode; /* Current video mode as known
by BIOS */
+static USHORT BiosVideoMode; /* Current video mode as known
by BIOS */
static ULONG ScreenWidth = 80; /* Screen Width in characters */
static ULONG ScreenHeight = 25; /* Screen Height in characters
*/
static ULONG BytesPerScanLine = 160; /* Number of bytes per scanline
(delta) */
@@ -191,7 +191,7 @@
}
}
-static VOID PcVideoSetBiosMode(ULONG VideoMode)
+static VOID PcVideoSetBiosMode(UCHAR VideoMode)
{
REGS Regs;
@@ -298,7 +298,7 @@
}
static VOID
-PcVideoDefineCursor(ULONG StartScanLine, ULONG EndScanLine)
+PcVideoDefineCursor(UCHAR StartScanLine, UCHAR EndScanLine)
{
REGS Regs;
@@ -334,7 +334,7 @@
}
static VOID
-PcVideoSetVerticalResolution(ULONG ScanLines)
+PcVideoSetVerticalResolution(UCHAR VerticalResolutionMode)
{
REGS Regs;
@@ -356,7 +356,7 @@
*/
Regs.b.ah = 0x12;
Regs.b.bl = 0x30;
- Regs.b.al = ScanLines;
+ Regs.b.al = VerticalResolutionMode;
Int386(0x10, &Regs, &Regs);
}
@@ -698,7 +698,7 @@
}
static BOOLEAN
-PcVideoSetMode(ULONG NewMode)
+PcVideoSetMode(USHORT NewMode)
{
CurrentMemoryBank = 0;
@@ -735,7 +735,7 @@
if (0x12 == NewMode)
{
/* 640x480x16 */
- PcVideoSetBiosMode(NewMode);
+ PcVideoSetBiosMode((UCHAR)NewMode);
WRITE_PORT_USHORT((USHORT*)0x03CE, 0x0F01); /* For some reason this is necessary?
*/
ScreenWidth = 640;
ScreenHeight = 480;
@@ -748,7 +748,7 @@
else if (0x13 == NewMode)
{
/* 320x200x256 */
- PcVideoSetBiosMode(NewMode);
+ PcVideoSetBiosMode((UCHAR)NewMode);
ScreenWidth = 320;
ScreenHeight = 200;
BytesPerScanLine = 320;
@@ -871,7 +871,7 @@
VIDEODISPLAYMODE
PcVideoSetDisplayMode(char *DisplayModeName, BOOLEAN Init)
{
- ULONG VideoMode = VIDEOMODE_NORMAL_TEXT;
+ USHORT VideoMode = VIDEOMODE_NORMAL_TEXT;
if (NULL == DisplayModeName || '\0' == *DisplayModeName)
{
@@ -923,7 +923,7 @@
PcVideoSetBlinkBit(! Init);
-
+DbgBreakPoint();
return DisplayMode;
}
@@ -958,7 +958,7 @@
}
VOID
-PcVideoSetTextCursorPosition(ULONG X, ULONG Y)
+PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
{
REGS Regs;
@@ -998,9 +998,9 @@
VOID
PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer)
{
- ULONG BanksToCopy;
+ USHORT BanksToCopy;
ULONG BytesInLastBank;
- ULONG CurrentBank;
+ USHORT CurrentBank;
ULONG BankSize;
/* PcVideoWaitForVerticalRetrace(); */
@@ -1014,7 +1014,7 @@
else if (VideoGraphicsMode == DisplayMode && VesaVideoMode)
{
BankSize = VesaVideoModeInformation.WindowGranularity << 10;
- BanksToCopy = (VesaVideoModeInformation.HeightInPixels *
VesaVideoModeInformation.BytesPerScanLine) / BankSize;
+ BanksToCopy = (USHORT)((VesaVideoModeInformation.HeightInPixels *
VesaVideoModeInformation.BytesPerScanLine) / BankSize);
BytesInLastBank = (VesaVideoModeInformation.HeightInPixels *
VesaVideoModeInformation.BytesPerScanLine) % BankSize;
/* Copy all the banks but the last one because
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxdisk.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -152,7 +152,7 @@
* Data block read and write commands
*/
#define IDEReadBlock(Address, Buffer, Count) \
- (__inwordstring(((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer), (Count) / 2))
+ (READ_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer),
(Count) / 2))
#define IDEWriteBlock(Address, Buffer, Count) \
(WRITE_PORT_BUFFER_USHORT((PUSHORT)((Address) + IDE_REG_DATA_PORT), (PUSHORT)(Buffer),
(Count) / 2))
@@ -435,7 +435,7 @@
}
BOOLEAN
-XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount,
PVOID Buffer)
+XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount,
PVOID Buffer)
{
ULONG StartSector;
UCHAR Count;
@@ -456,7 +456,7 @@
StartSector = (ULONG) SectorNumber;
while (0 < SectorCount)
{
- Count = (SectorCount <= 255 ? SectorCount : 255);
+ Count = (SectorCount <= 255 ? (UCHAR)SectorCount : 255);
if (! XboxDiskPolledRead(XBOX_IDE_COMMAND_PORT,
XBOX_IDE_CONTROL_PORT,
0, Count,
@@ -478,7 +478,7 @@
}
BOOLEAN
-XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry)
+XboxDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
UCHAR SectorData[IDE_SECTOR_BUF_SZ];
@@ -503,7 +503,7 @@
}
BOOLEAN
-XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY Geometry)
+XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY Geometry)
{
IDE_DRIVE_IDENTIFY DrvParms;
ULONG i;
@@ -563,7 +563,7 @@
}
ULONG
-XboxDiskGetCacheableBlockCount(ULONG DriveNumber)
+XboxDiskGetCacheableBlockCount(UCHAR DriveNumber)
{
/* 64 seems a nice number, it is used by the machpc code for LBA devices */
return 64;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -30,7 +30,7 @@
extern char reactos_arc_strings[32][256];
static PCM_PARTIAL_RESOURCE_LIST
-GetHarddiskConfigurationData(ULONG DriveNumber, ULONG* pSize)
+GetHarddiskConfigurationData(UCHAR DriveNumber, ULONG* pSize)
{
PCM_PARTIAL_RESOURCE_LIST PartialResourceList;
PCM_DISK_GEOMETRY_DEVICE_DATA DiskGeometry;
@@ -101,7 +101,7 @@
typedef struct tagDISKCONTEXT
{
- ULONG DriveNumber;
+ UCHAR DriveNumber;
ULONG SectorSize;
ULONGLONG SectorOffset;
ULONGLONG SectorCount;
@@ -122,7 +122,7 @@
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
Information->EndingAddress.QuadPart = (Context->SectorOffset +
Context->SectorCount) * Context->SectorSize;
- Information->CurrentAddress.LowPart = (Context->SectorOffset +
Context->SectorNumber) * Context->SectorSize;
+ Information->CurrentAddress.QuadPart = (Context->SectorOffset +
Context->SectorNumber) * Context->SectorSize;
return ESUCCESS;
}
@@ -130,7 +130,8 @@
static LONG DiskOpen(CHAR* Path, OPENMODE OpenMode, ULONG* FileId)
{
DISKCONTEXT* Context;
- ULONG DriveNumber, DrivePartition, SectorSize;
+ ULONG DrivePartition, SectorSize;
+ UCHAR DriveNumber;
ULONGLONG SectorOffset = 0;
ULONGLONG SectorCount = 0;
PARTITION_TABLE_ENTRY PartitionTableEntry;
@@ -233,7 +234,7 @@
static VOID
GetHarddiskIdentifier(PCHAR Identifier,
- ULONG DriveNumber)
+ UCHAR DriveNumber)
{
PMASTER_BOOT_RECORD Mbr;
ULONG *Buffer;
@@ -274,7 +275,7 @@
reactos_arc_strings[reactos_disk_count];
reactos_disk_count++;
- sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(0)", DriveNumber -
0x80);
+ sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber -
0x80);
FsRegisterDevice(ArcName, &DiskVtbl);
/* Add partitions */
@@ -284,7 +285,7 @@
{
if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED)
{
- sprintf(ArcName, "multi(0)disk(0)rdisk(%lu)partition(%lu)", DriveNumber -
0x80, i);
+ sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(%lu)", DriveNumber -
0x80, i);
FsRegisterDevice(ArcName, &DiskVtbl);
}
i++;
@@ -323,9 +324,8 @@
PCM_INT13_DRIVE_PARAMETER Int13Drives;
GEOMETRY Geometry;
PCONFIGURATION_COMPONENT_DATA DiskKey, ControllerKey;
- ULONG DiskCount;
+ UCHAR DiskCount, i;
ULONG Size;
- ULONG i;
BOOLEAN Changed;
/* Count the number of visible drives */
@@ -390,8 +390,8 @@
{
Int13Drives[i].DriveSelect = 0x80 + i;
Int13Drives[i].MaxCylinders = Geometry.Cylinders - 1;
- Int13Drives[i].SectorsPerTrack = Geometry.Sectors;
- Int13Drives[i].MaxHeads = Geometry.Heads - 1;
+ Int13Drives[i].SectorsPerTrack = (USHORT)Geometry.Sectors;
+ Int13Drives[i].MaxHeads = (USHORT)Geometry.Heads - 1;
Int13Drives[i].NumberDrives = DiskCount;
DPRINTM(DPRINT_HWDETECT,
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -182,7 +182,7 @@
}
VOID
-XboxVideoSetTextCursorPosition(ULONG X, ULONG Y)
+XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
{
/* We don't have a cursor yet */
}
Modified: trunk/reactos/boot/freeldr/freeldr/cache/cache.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/cache…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/cache/cache.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/cache/cache.c [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -32,7 +32,7 @@
ULONG CacheSizeLimit = 0;
ULONG CacheSizeCurrent = 0;
-BOOLEAN CacheInitializeDrive(ULONG DriveNumber)
+BOOLEAN CacheInitializeDrive(UCHAR DriveNumber)
{
PCACHE_BLOCK NextCacheBlock;
GEOMETRY DriveGeometry;
@@ -111,7 +111,7 @@
CacheManagerDataInvalid = TRUE;
}
-BOOLEAN CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount,
PVOID Buffer)
+BOOLEAN CacheReadDiskSectors(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount,
PVOID Buffer)
{
PCACHE_BLOCK CacheBlock;
ULONG StartBlock;
@@ -122,7 +122,7 @@
ULONG BlockCount;
ULONG Idx;
- DPRINTM(DPRINT_CACHE, "CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %d
SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector, SectorCount, Buffer);
+ DPRINTM(DPRINT_CACHE, "CacheReadDiskSectors() DiskNumber: 0x%x StartSector: %I64d
SectorCount: %d Buffer: 0x%x\n", DiskNumber, StartSector, SectorCount, Buffer);
// If we aren't initialized yet then they can't do this
if (CacheManagerInitialized == FALSE)
@@ -133,11 +133,11 @@
//
// Caculate which blocks we must cache
//
- StartBlock = StartSector / CacheManagerDrive.BlockSize;
- SectorOffsetInStartBlock = StartSector % CacheManagerDrive.BlockSize;
- CopyLengthInStartBlock = (SectorCount > (CacheManagerDrive.BlockSize -
SectorOffsetInStartBlock)) ? (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock) :
SectorCount;
- EndBlock = (StartSector + (SectorCount - 1)) / CacheManagerDrive.BlockSize;
- SectorOffsetInEndBlock = 1 + (StartSector + (SectorCount - 1)) %
CacheManagerDrive.BlockSize;
+ StartBlock = (ULONG)(StartSector / CacheManagerDrive.BlockSize);
+ SectorOffsetInStartBlock = (ULONG)(StartSector % CacheManagerDrive.BlockSize);
+ CopyLengthInStartBlock = (ULONG)((SectorCount > (CacheManagerDrive.BlockSize -
SectorOffsetInStartBlock)) ? (CacheManagerDrive.BlockSize - SectorOffsetInStartBlock) :
SectorCount);
+ EndBlock = (ULONG)((StartSector + (SectorCount - 1)) / CacheManagerDrive.BlockSize);
+ SectorOffsetInEndBlock = (ULONG)(1 + (StartSector + (SectorCount - 1)) %
CacheManagerDrive.BlockSize);
BlockCount = (EndBlock - StartBlock) + 1;
DPRINTM(DPRINT_CACHE, "StartBlock: %d SectorOffsetInStartBlock: %d
CopyLengthInStartBlock: %d EndBlock: %d SectorOffsetInEndBlock: %d BlockCount: %d\n",
StartBlock, SectorOffsetInStartBlock, CopyLengthInStartBlock, EndBlock,
SectorOffsetInEndBlock, BlockCount);
@@ -244,7 +244,7 @@
}
#if 0
-BOOLEAN CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULONG
SectorCount)
+BOOLEAN CacheForceDiskSectorsIntoCache(UCHAR DiskNumber, ULONGLONG StartSector, ULONG
SectorCount)
{
PCACHE_BLOCK CacheBlock;
ULONG StartBlock;
Modified: trunk/reactos/boot/freeldr/freeldr/disk/disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -87,7 +87,7 @@
// This function is in arch/i386/i386disk.c
//BOOLEAN DiskReadLogicalSectors(ULONG DriveNumber, U64 SectorNumber, ULONG SectorCount,
PVOID Buffer)
-BOOLEAN DiskIsDriveRemovable(ULONG DriveNumber)
+BOOLEAN DiskIsDriveRemovable(UCHAR DriveNumber)
{
// Hard disks use drive numbers >= 0x80
// So if the drive number indicates a hard disk
@@ -188,6 +188,6 @@
//VOID DiskStopFloppyMotor(VOID)
// This function is in arch/i386/i386disk.c
-//ULONG DiskGetCacheableBlockCount(ULONG DriveNumber)
+//ULONG DiskGetCacheableBlockCount(UCHAR DriveNumber)
#endif
Modified: trunk/reactos/boot/freeldr/freeldr/disk/partition.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/partition.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/partition.c [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -21,7 +21,7 @@
#include <freeldr.h>
#include <debug.h>
-BOOLEAN DiskGetActivePartitionEntry(ULONG DriveNumber,
+BOOLEAN DiskGetActivePartitionEntry(UCHAR DriveNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry,
ULONG *ActivePartition)
{
@@ -77,7 +77,7 @@
return TRUE;
}
-BOOLEAN DiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry)
+BOOLEAN DiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry)
{
MASTER_BOOT_RECORD MasterBootRecord;
PARTITION_TABLE_ENTRY ExtendedPartitionTableEntry;
@@ -195,7 +195,7 @@
return FALSE;
}
-BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber,
PMASTER_BOOT_RECORD BootRecord)
+BOOLEAN DiskReadBootRecord(UCHAR DriveNumber, ULONGLONG LogicalSectorNumber,
PMASTER_BOOT_RECORD BootRecord)
{
ULONG Index;
Modified: trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/scsiport.c [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -137,9 +137,9 @@
{
/* Device ID */
PSCSI_PORT_DEVICE_EXTENSION DeviceExtension;
- ULONG PathId;
- ULONG TargetId;
- ULONG Lun;
+ UCHAR PathId;
+ UCHAR TargetId;
+ UCHAR Lun;
/* Device characteristics */
ULONG SectorSize;
@@ -162,7 +162,7 @@
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
Information->EndingAddress.QuadPart = Context->SectorCount *
Context->SectorSize;
- Information->CurrentAddress.LowPart = Context->SectorNumber *
Context->SectorSize;
+ Information->CurrentAddress.QuadPart = Context->SectorNumber *
Context->SectorSize;
return ESUCCESS;
}
@@ -195,9 +195,9 @@
RtlZeroMemory(Srb, sizeof(SCSI_REQUEST_BLOCK));
Srb->Length = sizeof(SCSI_REQUEST_BLOCK);
Srb->Function = SRB_FUNCTION_EXECUTE_SCSI;
- Srb->PathId = PathId;
- Srb->TargetId = TargetId;
- Srb->Lun = Lun;
+ Srb->PathId = (UCHAR)PathId;
+ Srb->TargetId = (UCHAR)TargetId;
+ Srb->Lun = (UCHAR)Lun;
Srb->CdbLength = 10;
Srb->SrbFlags = SRB_FLAGS_DATA_IN;
Srb->DataTransferLength = sizeof(READ_CAPACITY_DATA);
@@ -225,9 +225,9 @@
if (!Context)
return ENOMEM;
Context->DeviceExtension = DeviceExtension;
- Context->PathId = PathId;
- Context->TargetId = TargetId;
- Context->Lun = Lun;
+ Context->PathId = (UCHAR)PathId;
+ Context->TargetId = (UCHAR)TargetId;
+ Context->Lun = (UCHAR)Lun;
Context->SectorSize = SectorSize;
Context->SectorOffset = SectorOffset;
Context->SectorCount = SectorCount;
@@ -258,7 +258,8 @@
return EINVAL;
/* Read full sectors */
- Lba = Context->SectorNumber;
+ ASSERT(Context->SectorNumber < 0xFFFFFFFF);
+ Lba = (ULONG)Context->SectorNumber;
if (FullSectors > 0)
{
Srb = ExAllocatePool(PagedPool, sizeof(SCSI_REQUEST_BLOCK));
@@ -810,14 +811,14 @@
SpiScanAdapter(
IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension,
IN ULONG ScsiBus,
- IN ULONG PathId)
+ IN UCHAR PathId)
{
CHAR ArcName[64];
PSCSI_REQUEST_BLOCK Srb;
PCDB Cdb;
INQUIRYDATA InquiryBuffer;
- ULONG TargetId;
- ULONG Lun;
+ UCHAR TargetId;
+ UCHAR Lun;
if (!DeviceExtension->HwResetBus(DeviceExtension->MiniPortDeviceExtension,
PathId))
{
@@ -852,7 +853,7 @@
Cdb = (PCDB)Srb->Cdb;
Cdb->CDB6INQUIRY.OperationCode = SCSIOP_INQUIRY;
Cdb->CDB6INQUIRY.LogicalUnitNumber = Srb->Lun;
- Cdb->CDB6INQUIRY.AllocationLength = Srb->DataTransferLength;
+ Cdb->CDB6INQUIRY.AllocationLength = (UCHAR)Srb->DataTransferLength;
if (!SpiSendSynchronousSrb(DeviceExtension, Srb))
{
/* Don't check next LUNs */
@@ -862,13 +863,13 @@
/* Device exists, create its ARC name */
if (InquiryBuffer.RemovableMedia)
{
- sprintf(ArcName, "scsi(%ld)cdrom(%ld)fdisk(%ld)",
+ sprintf(ArcName, "scsi(%ld)cdrom(%d)fdisk(%d)",
ScsiBus, TargetId, Lun);
FsRegisterDevice(ArcName, &DiskVtbl);
}
else
{
- sprintf(ArcName, "scsi(%ld)disk(%ld)rdisk(%ld)",
+ sprintf(ArcName, "scsi(%ld)disk(%d)rdisk(%d)",
ScsiBus, TargetId, Lun);
/* Now, check if it has partitions */
SpiScanDevice(DeviceExtension, ArcName, PathId, TargetId, Lun);
@@ -1074,6 +1075,7 @@
BOOLEAN Again;
BOOLEAN FirstConfigCall = TRUE;
PCI_SLOT_NUMBER SlotNumber;
+ UCHAR ScsiBus;
NTSTATUS Status;
if (HwInitializationData->HwInitializationDataSize !=
sizeof(HW_INITIALIZATION_DATA))
@@ -1196,13 +1198,10 @@
}
/* Scan bus */
- {
- ULONG ScsiBus;
- for (ScsiBus = 0; ScsiBus < PortConfig.NumberOfBuses; ScsiBus++)
- {
- SpiScanAdapter(DeviceExtension, PortConfig.SystemIoBusNumber, ScsiBus);
- PortConfig.SystemIoBusNumber++;
- }
+ for (ScsiBus = 0; ScsiBus < PortConfig.NumberOfBuses; ScsiBus++)
+ {
+ SpiScanAdapter(DeviceExtension, PortConfig.SystemIoBusNumber, ScsiBus);
+ PortConfig.SystemIoBusNumber++;
}
FirstConfigCall = FALSE;
@@ -1633,7 +1632,7 @@
CHAR NtBootDdPath[MAX_PATH];
PVOID ImageBase;
ULONG (NTAPI *EntryPoint)(IN PVOID DriverObject, IN PVOID RegistryPath);
- ULONG i;
+ USHORT i;
BOOLEAN Status;
/* Some initialization of our temporary loader block */
@@ -1710,7 +1709,7 @@
NtHeaders = RtlImageNtHeader(VaToPa(BootDdDTE->DllBase));
if (!NtHeaders)
return EIO;
- Status = LdrRelocateImageWithBias(
+ Status = (BOOLEAN)LdrRelocateImageWithBias(
VaToPa(BootDdDTE->DllBase),
NtHeaders->OptionalHeader.ImageBase - (ULONG_PTR)BootDdDTE->DllBase,
"FreeLdr",
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -57,12 +57,12 @@
// We need to emulate these, because the original ones don't work in freeldr
int __cdecl wctomb(char *mbchar, wchar_t wchar)
{
- *mbchar = wchar;
+ *mbchar = (char)wchar;
return 1;
}
int __cdecl mbtowc (wchar_t *wchar, const char *mbchar, size_t count)
{
- *wchar = *mbchar;
+ *wchar = (wchar_t)*mbchar;
return 1;
}
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/ex…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ext2.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -25,7 +25,7 @@
PEXT2_FILE_INFO Ext2OpenFile(PCSTR FileName);
BOOLEAN Ext2LookupFile(PCSTR FileName, PEXT2_FILE_INFO Ext2FileInfoPointer);
BOOLEAN Ext2SearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectorySize,
PCHAR FileName, PEXT2_DIR_ENTRY DirectoryEntry);
-BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONGLONG
SectorCount, PVOID Buffer);
+BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
BOOLEAN Ext2ReadFileBig(PEXT2_FILE_INFO Ext2FileInfo, ULONGLONG BytesToRead, ULONGLONG*
BytesRead, PVOID Buffer);
BOOLEAN Ext2ReadSuperBlock(VOID);
@@ -61,7 +61,7 @@
ULONG Ext2InodesPerBlock = 0; // Number of inodes in one block
ULONG Ext2GroupDescPerBlock = 0; // Number of group descriptors in one block
-BOOLEAN DiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG
SectorCount, int *FsType)
+BOOLEAN DiskGetBootVolume(PUCHAR DriveNumber, PULONGLONG StartSector, PULONGLONG
SectorCount, int *FsType)
{
*DriveNumber = 0;
*StartSector = 0;
@@ -425,7 +425,7 @@
DPRINTM(DPRINT_FILESYSTEM, "Reading fast symbolic link data\n");
// Copy the data from the link
- RtlCopyMemory(Buffer, (PVOID)((ULONG_PTR)Ext2FileInfo->FilePointer +
Ext2FileInfo->Inode.symlink), BytesToRead);
+ RtlCopyMemory(Buffer, (PVOID)((ULONG_PTR)Ext2FileInfo->FilePointer +
Ext2FileInfo->Inode.symlink), (ULONG)BytesToRead);
if (BytesRead != NULL)
{
@@ -472,10 +472,10 @@
//
// Do the math for our first read
//
- BlockNumberIndex = (Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes);
+ BlockNumberIndex = (ULONG)(Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes);
BlockNumber = Ext2FileInfo->FileBlockList[BlockNumberIndex];
OffsetInBlock = (Ext2FileInfo->FilePointer % Ext2BlockSizeInBytes);
- LengthInBlock = (BytesToRead > (Ext2BlockSizeInBytes - OffsetInBlock)) ?
(Ext2BlockSizeInBytes - OffsetInBlock) : BytesToRead;
+ LengthInBlock = (ULONG)((BytesToRead > (Ext2BlockSizeInBytes - OffsetInBlock)) ?
(Ext2BlockSizeInBytes - OffsetInBlock) : BytesToRead);
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
@@ -501,11 +501,11 @@
//
// Determine how many full clusters we need to read
//
- NumberOfBlocks = (BytesToRead / Ext2BlockSizeInBytes);
+ NumberOfBlocks = (ULONG)(BytesToRead / Ext2BlockSizeInBytes);
while (NumberOfBlocks > 0)
{
- BlockNumberIndex = (Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes);
+ BlockNumberIndex = (ULONG)(Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes);
BlockNumber = Ext2FileInfo->FileBlockList[BlockNumberIndex];
//
@@ -531,13 +531,13 @@
//
if (BytesToRead > 0)
{
- BlockNumberIndex = (Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes);
+ BlockNumberIndex = (ULONG)(Ext2FileInfo->FilePointer / Ext2BlockSizeInBytes);
BlockNumber = Ext2FileInfo->FileBlockList[BlockNumberIndex];
//
// Now do the read and update BytesRead, BytesToRead, FilePointer, & Buffer
//
- if (!Ext2ReadPartialBlock(BlockNumber, 0, BytesToRead, Buffer))
+ if (!Ext2ReadPartialBlock(BlockNumber, 0, (ULONG)BytesToRead, Buffer))
{
return FALSE;
}
@@ -553,7 +553,7 @@
return TRUE;
}
-BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONGLONG
SectorCount, PVOID Buffer)
+BOOLEAN Ext2ReadVolumeSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer)
{
//GEOMETRY DiskGeometry;
//BOOLEAN ReturnValue;
@@ -796,7 +796,8 @@
//
// Now allocate the memory to hold the group descriptors
//
- *DirectoryBuffer = (PEXT2_DIR_ENTRY)MmHeapAlloc(DirectoryFileInfo.FileSize);
+ ASSERT(DirectoryFileInfo.FileSize <= 0xFFFFFFFF);
+ *DirectoryBuffer = (PEXT2_DIR_ENTRY)MmHeapAlloc((ULONG)DirectoryFileInfo.FileSize);
//
// Make sure we got the memory
@@ -1009,7 +1010,7 @@
//BlockCount = Inode->i_blocks;
FileSize = Ext2GetInodeFileSize(Inode);
FileSize = ROUND_UP(FileSize, Ext2BlockSizeInBytes);
- BlockCount = (FileSize / Ext2BlockSizeInBytes);
+ BlockCount = (ULONG)(FileSize / Ext2BlockSizeInBytes);
// Allocate the memory for the block list
BlockList = MmHeapAlloc(BlockCount * sizeof(ULONG));
@@ -1181,8 +1182,8 @@
PEXT2_FILE_INFO FileHandle = FsGetDeviceSpecific(FileId);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
- Information->EndingAddress.LowPart = FileHandle->FileSize;
- Information->CurrentAddress.LowPart = FileHandle->FilePointer;
+ Information->EndingAddress.QuadPart = FileHandle->FileSize;
+ Information->CurrentAddress.QuadPart = FileHandle->FilePointer;
DPRINTM(DPRINT_FILESYSTEM, "Ext2GetFileInformation() FileSize = %d\n",
Information->EndingAddress.LowPart);
@@ -1297,7 +1298,7 @@
//
// Compatibility hack as long as FS is not using underlying device DeviceId
//
- ULONG DriveNumber;
+ UCHAR DriveNumber;
ULONGLONG StartSector;
ULONGLONG SectorCount;
int Type;
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fa…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -23,7 +23,7 @@
#define NDEBUG
#include <debug.h>
-ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount);
+ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONGLONG
PartitionSectorCount);
PVOID FatBufferDirectory(PFAT_VOLUME_INFO Volume, ULONG DirectoryStartCluster, ULONG*
EntryCountPointer, BOOLEAN RootDirectory);
BOOLEAN FatSearchDirectoryBufferForFile(PFAT_VOLUME_INFO Volume, PVOID DirectoryBuffer,
ULONG EntryCount, PCHAR FileName, PFAT_FILE_INFO FatFileInfoPointer);
LONG FatLookupFile(PFAT_VOLUME_INFO Volume, PCSTR FileName, ULONG DeviceId,
PFAT_FILE_INFO FatFileInfoPointer);
@@ -263,8 +263,8 @@
Volume->FatSectorStart = (4096 / Volume->BytesPerSector);
Volume->ActiveFatSectorStart = Volume->FatSectorStart;
Volume->NumberOfFats = 1;
- FatSize = PartitionSectorCount / Volume->SectorsPerCluster *
- (Volume->FatType == FATX16 ? 2 : 4);
+ FatSize = (ULONG)(PartitionSectorCount / Volume->SectorsPerCluster *
+ (Volume->FatType == FATX16 ? 2 : 4));
Volume->SectorsPerFat = (((FatSize + 4095) / 4096) * 4096) /
Volume->BytesPerSector;
Volume->RootDirSectorStart = Volume->FatSectorStart + Volume->NumberOfFats *
Volume->SectorsPerFat;
@@ -313,7 +313,7 @@
return TRUE;
}
-ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONG PartitionSectorCount)
+ULONG FatDetermineFatType(PFAT_BOOTSECTOR FatBootSector, ULONGLONG PartitionSectorCount)
{
ULONG RootDirSectors;
ULONG DataSectorCount;
@@ -325,7 +325,7 @@
if (0 == strncmp(FatXBootSector->FileSystemType, "FATX", 4))
{
- CountOfClusters = PartitionSectorCount / FatXBootSector->SectorsPerCluster;
+ CountOfClusters = (ULONG)(PartitionSectorCount /
FatXBootSector->SectorsPerCluster);
if (CountOfClusters < 65525)
{
/* Volume is FATX16 */
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/nt…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -134,7 +134,7 @@
{
LARGE_INTEGER Position;
ULONG Count;
- USHORT ReadLength;
+ ULONG ReadLength;
LONG ret;
DPRINTM(DPRINT_FILESYSTEM, "NtfsDiskRead - Offset: %I64d Length: %I64d\n",
Offset, Length);
@@ -144,15 +144,14 @@
//
if (Offset % Volume->BootSector.BytesPerSector)
{
- Position.HighPart = 0;
- Position.LowPart = Offset & ~(Volume->BootSector.BytesPerSector - 1);
+ Position.QuadPart = Offset & ~(Volume->BootSector.BytesPerSector - 1);
ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
if (ret != ESUCCESS)
return FALSE;
ret = ArcRead(Volume->DeviceId, Volume->TemporarySector,
Volume->BootSector.BytesPerSector, &Count);
if (ret != ESUCCESS || Count != Volume->BootSector.BytesPerSector)
return FALSE;
- ReadLength = min(Length, Volume->BootSector.BytesPerSector - (Offset %
Volume->BootSector.BytesPerSector));
+ ReadLength = (USHORT)min(Length, Volume->BootSector.BytesPerSector - (Offset %
Volume->BootSector.BytesPerSector));
//
// Copy interesting data
@@ -174,8 +173,7 @@
//
if (Length >= Volume->BootSector.BytesPerSector)
{
- Position.HighPart = 0;
- Position.LowPart = Offset;
+ Position.QuadPart = Offset;
ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
if (ret != ESUCCESS)
return FALSE;
@@ -197,12 +195,11 @@
//
if (Length)
{
- Position.HighPart = 0;
- Position.LowPart = Offset;
+ Position.QuadPart = Offset;
ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
if (ret != ESUCCESS)
return FALSE;
- ret = ArcRead(Volume->DeviceId, Buffer, Length, &Count);
+ ret = ArcRead(Volume->DeviceId, Buffer, (ULONG)Length, &Count);
if (ret != ESUCCESS || Count != Length)
return FALSE;
}
@@ -210,7 +207,7 @@
return TRUE;
}
-static ULONGLONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT Context,
ULONGLONG Offset, PCHAR Buffer, ULONGLONG Length)
+static ULONG NtfsReadAttribute(PNTFS_VOLUME_INFO Volume, PNTFS_ATTR_CONTEXT Context,
ULONGLONG Offset, PCHAR Buffer, ULONG Length)
{
ULONGLONG LastLCN;
PUCHAR DataRun;
@@ -218,15 +215,15 @@
ULONGLONG DataRunLength;
LONGLONG DataRunStartLCN;
ULONGLONG CurrentOffset;
- ULONGLONG ReadLength;
- ULONGLONG AlreadyRead;
+ ULONG ReadLength;
+ ULONG AlreadyRead;
if (!Context->Record.IsNonResident)
{
if (Offset > Context->Record.Resident.ValueLength)
return 0;
if (Offset + Length > Context->Record.Resident.ValueLength)
- Length = Context->Record.Resident.ValueLength - Offset;
+ Length = (ULONG)(Context->Record.Resident.ValueLength - Offset);
RtlCopyMemory(Buffer, (PCHAR)&Context->Record +
Context->Record.Resident.ValueOffset + Offset, Length);
return Length;
}
@@ -291,7 +288,7 @@
* II. Go through the run list and read the data
*/
- ReadLength = min(DataRunLength * Volume->ClusterSize - (Offset - CurrentOffset),
Length);
+ ReadLength = (ULONG)min(DataRunLength * Volume->ClusterSize - (Offset -
CurrentOffset), Length);
if (DataRunStartLCN == -1)
RtlZeroMemory(Buffer, ReadLength);
if (NtfsDiskRead(Volume, DataRunStartLCN * Volume->ClusterSize + Offset -
CurrentOffset, ReadLength, Buffer))
@@ -318,7 +315,7 @@
while (Length > 0)
{
- ReadLength = min(DataRunLength * Volume->ClusterSize, Length);
+ ReadLength = (ULONG)min(DataRunLength * Volume->ClusterSize, Length);
if (DataRunStartLCN == -1)
RtlZeroMemory(Buffer, ReadLength);
else if (!NtfsDiskRead(Volume, DataRunStartLCN * Volume->ClusterSize,
ReadLength, Buffer))
@@ -384,12 +381,21 @@
ListContext = NtfsPrepareAttributeContext(AttrRecord);
ListSize = NtfsGetAttributeSize(&ListContext->Record);
- ListBuffer = MmHeapAlloc(ListSize);
+ if(ListSize <= 0xFFFFFFFF)
+ ListBuffer = MmHeapAlloc((ULONG)ListSize);
+ else
+ ListBuffer = NULL;
+
+ if(!ListBuffer)
+ {
+ DPRINTM(DPRINT_FILESYSTEM, "Failed to allocate memory: %x\n",
(ULONG)ListSize);
+ continue;
+ }
ListAttrRecord = (PNTFS_ATTR_RECORD)ListBuffer;
ListAttrRecordEnd = (PNTFS_ATTR_RECORD)((PCHAR)ListBuffer + ListSize);
- if (NtfsReadAttribute(Volume, ListContext, 0, ListBuffer, ListSize) ==
ListSize)
+ if (NtfsReadAttribute(Volume, ListContext, 0, ListBuffer, (ULONG)ListSize) ==
ListSize)
{
Context = NtfsFindAttributeHelper(Volume, ListAttrRecord,
ListAttrRecordEnd,
Type, Name, NameLength);
@@ -463,7 +469,7 @@
return TRUE;
}
-static BOOLEAN NtfsReadMftRecord(PNTFS_VOLUME_INFO Volume, ULONG MFTIndex,
PNTFS_MFT_RECORD Buffer)
+static BOOLEAN NtfsReadMftRecord(PNTFS_VOLUME_INFO Volume, ULONGLONG MFTIndex,
PNTFS_MFT_RECORD Buffer)
{
ULONGLONG BytesRead;
@@ -484,10 +490,10 @@
UCHAR i;
FileName = IndexEntry->FileName.FileName;
- FileNameLength = IndexEntry->FileName.FileNameLength;
+ FileNameLength = min(IndexEntry->FileName.FileNameLength, 255);
for (i = 0; i < FileNameLength; i++)
- AnsiFileName[i] = FileName[i];
+ AnsiFileName[i] = (CHAR)FileName[i];
AnsiFileName[i] = 0;
DPRINTM(DPRINT_FILESYSTEM, "- %s (%x)\n", AnsiFileName,
IndexEntry->Data.Directory.IndexedFile);
@@ -527,7 +533,7 @@
return TRUE;
}
-static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONG MFTIndex, PCHAR
FileName, ULONG *OutMFTIndex)
+static BOOLEAN NtfsFindMftRecord(PNTFS_VOLUME_INFO Volume, ULONGLONG MFTIndex, PCHAR
FileName, ULONGLONG *OutMFTIndex)
{
PNTFS_MFT_RECORD MftRecord;
ULONG Magic;
@@ -603,15 +609,19 @@
return FALSE;
}
BitmapDataSize = NtfsGetAttributeSize(&IndexBitmapCtx->Record);
- DPRINTM(DPRINT_FILESYSTEM, "BitmapDataSize: %x\n",
BitmapDataSize);
- BitmapData = MmHeapAlloc(BitmapDataSize);
+ DPRINTM(DPRINT_FILESYSTEM, "BitmapDataSize: %x\n",
(ULONG)BitmapDataSize);
+ if(BitmapDataSize <= 0xFFFFFFFF)
+ BitmapData = MmHeapAlloc((ULONG)BitmapDataSize);
+ else
+ BitmapData = NULL;
+
if (BitmapData == NULL)
{
MmHeapFree(IndexRecord);
MmHeapFree(MftRecord);
return FALSE;
}
- NtfsReadAttribute(Volume, IndexBitmapCtx, 0, BitmapData, BitmapDataSize);
+ NtfsReadAttribute(Volume, IndexBitmapCtx, 0, BitmapData,
(ULONG)BitmapDataSize);
NtfsReleaseAttributeContext(IndexBitmapCtx);
IndexAllocationCtx = NtfsFindAttribute(Volume, MftRecord,
NTFS_ATTR_TYPE_INDEX_ALLOCATION, L"$I30");
@@ -693,7 +703,7 @@
{
ULONG NumberOfPathParts;
CHAR PathPart[261];
- ULONG CurrentMFTIndex;
+ ULONGLONG CurrentMFTIndex;
UCHAR i;
DPRINTM(DPRINT_FILESYSTEM, "NtfsLookupFile() FileName = %s\n", FileName);
@@ -748,8 +758,8 @@
PNTFS_FILE_HANDLE FileHandle = FsGetDeviceSpecific(FileId);
RtlZeroMemory(Information, sizeof(FILEINFORMATION));
- Information->EndingAddress.LowPart =
(ULONG)NtfsGetAttributeSize(&FileHandle->DataContext->Record);
- Information->CurrentAddress.LowPart = FileHandle->Offset;
+ Information->EndingAddress.QuadPart =
NtfsGetAttributeSize(&FileHandle->DataContext->Record);
+ Information->CurrentAddress.QuadPart = FileHandle->Offset;
DPRINTM(DPRINT_FILESYSTEM, "NtfsGetFileInformation() FileSize = %d\n",
Information->EndingAddress.LowPart);
@@ -923,8 +933,7 @@
MmHeapFree(Volume);
return NULL;
}
- Position.HighPart = 0;
- Position.LowPart = Volume->BootSector.MftLocation * Volume->ClusterSize;
+ Position.QuadPart = Volume->BootSector.MftLocation * Volume->ClusterSize;
ret = ArcSeek(DeviceId, &Position, SeekAbsolute);
if (ret != ESUCCESS)
{
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/drivemap.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/drivemap.h [iso-8859-1]
(original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/drivemap.h [iso-8859-1] Sun Jul
3 23:01:39 2011
@@ -29,7 +29,7 @@
VOID DriveMapMapDrivesInSection(PCSTR SectionName);
BOOLEAN DriveMapIsValidDriveString(PCSTR DriveString); // Checks the drive string
("hd0") for validity
-ULONG DriveMapGetBiosDriveNumber(PCSTR DeviceName); // Returns a BIOS drive number for
any given device name (e.g. 0x80 for 'hd0')
+UCHAR DriveMapGetBiosDriveNumber(PCSTR DeviceName); // Returns a BIOS drive number for
any given device name (e.g. 0x80 for 'hd0')
VOID DriveMapInstallInt13Handler(PDRIVE_MAP_LIST DriveMap); // Installs the int 13h
handler for the drive mapper
VOID DriveMapRemoveInt13Handler(VOID); // Removes a previously installed int 13h
drive map handler
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h [iso-8859-1]
(original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h [iso-8859-1] Sun Jul
3 23:01:39 2011
@@ -36,7 +36,7 @@
VIDEODISPLAYMODE XboxVideoSetDisplayMode(char *DisplayModem, BOOLEAN Init);
VOID XboxVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth);
ULONG XboxVideoGetBufferSize(VOID);
-VOID XboxVideoSetTextCursorPosition(ULONG X, ULONG Y);
+VOID XboxVideoSetTextCursorPosition(UCHAR X, UCHAR Y);
VOID XboxVideoHideShowTextCursor(BOOLEAN Show);
VOID XboxVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
VOID XboxVideoCopyOffScreenBufferToVRAM(PVOID Buffer);
@@ -51,10 +51,10 @@
PVOID XboxMemReserveMemory(ULONG MbToReserve);
ULONG XboxMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
-BOOLEAN XboxDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
-BOOLEAN XboxDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
-BOOLEAN XboxDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry);
-ULONG XboxDiskGetCacheableBlockCount(ULONG DriveNumber);
+BOOLEAN XboxDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
+BOOLEAN XboxDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
+BOOLEAN XboxDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
+ULONG XboxDiskGetCacheableBlockCount(UCHAR DriveNumber);
TIMEINFO* XboxGetTime(VOID);
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/machpc.h [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -35,7 +35,7 @@
VIDEODISPLAYMODE PcVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init);
VOID PcVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth);
ULONG PcVideoGetBufferSize(VOID);
-VOID PcVideoSetTextCursorPosition(ULONG X, ULONG Y);
+VOID PcVideoSetTextCursorPosition(UCHAR X, UCHAR Y);
VOID PcVideoHideShowTextCursor(BOOLEAN Show);
VOID PcVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
VOID PcVideoCopyOffScreenBufferToVRAM(PVOID Buffer);
@@ -49,10 +49,10 @@
ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
BOOLEAN PcDiskGetBootPath(char *BootPath, unsigned Size);
-BOOLEAN PcDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
-BOOLEAN PcDiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
-BOOLEAN PcDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry);
-ULONG PcDiskGetCacheableBlockCount(ULONG DriveNumber);
+BOOLEAN PcDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
+BOOLEAN PcDiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
+BOOLEAN PcDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
+ULONG PcDiskGetCacheableBlockCount(UCHAR DriveNumber);
TIMEINFO* PcGetTime(VOID);
Modified: trunk/reactos/boot/freeldr/freeldr/include/cache.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/cache.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/cache.h [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -50,7 +50,7 @@
///////////////////////////////////////////////////////////////////////////////////////
typedef struct
{
- ULONG DriveNumber;
+ UCHAR DriveNumber;
ULONG BytesPerSector;
ULONG BlockSize; // Block size (in sectors)
@@ -84,8 +84,8 @@
VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK
CacheBlock); // Moves the specified block to the head of the list
-BOOLEAN CacheInitializeDrive(ULONG DriveNumber);
+BOOLEAN CacheInitializeDrive(UCHAR DriveNumber);
VOID CacheInvalidateCacheData(VOID);
-BOOLEAN CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount,
PVOID Buffer);
-BOOLEAN CacheForceDiskSectorsIntoCache(ULONG DiskNumber, ULONG StartSector, ULONG
SectorCount);
+BOOLEAN CacheReadDiskSectors(UCHAR DiskNumber, ULONGLONG StartSector, ULONG SectorCount,
PVOID Buffer);
+BOOLEAN CacheForceDiskSectorsIntoCache(UCHAR DiskNumber, ULONGLONG StartSector, ULONG
SectorCount);
BOOLEAN CacheReleaseMemory(ULONG MinimumAmountToRelease);
Modified: trunk/reactos/boot/freeldr/freeldr/include/disk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -105,10 +105,10 @@
///////////////////////////////////////////////////////////////////////////////////////
#if defined(__i386__) || defined(_M_AMD64)
-BOOLEAN DiskResetController(ULONG DriveNumber);
-BOOLEAN DiskInt13ExtensionsSupported(ULONG DriveNumber);
+BOOLEAN DiskResetController(UCHAR DriveNumber);
+BOOLEAN DiskInt13ExtensionsSupported(UCHAR DriveNumber);
//VOID DiskStopFloppyMotor(VOID);
-BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT
BufferSize);
+BOOLEAN DiskGetExtendedDriveParameters(UCHAR DriveNumber, PVOID Buffer, USHORT
BufferSize);
#endif // defined __i386__ || defined(_M_AMD64)
@@ -120,10 +120,10 @@
VOID DiskReportError (BOOLEAN bError);
VOID DiskError(PCSTR ErrorString, ULONG ErrorCode);
PCSTR DiskGetErrorCodeString(ULONG ErrorCode);
-BOOLEAN DiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer); // Implemented in i386disk.c
-BOOLEAN DiskIsDriveRemovable(ULONG DriveNumber);
+BOOLEAN DiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer); // Implemented in i386disk.c
+BOOLEAN DiskIsDriveRemovable(UCHAR DriveNumber);
VOID DiskStopFloppyMotor(VOID); // Implemented in i386disk.c
-extern ULONG FrldrBootDrive;
+extern UCHAR FrldrBootDrive;
extern ULONG FrldrBootPartition;
BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
@@ -134,10 +134,10 @@
// Fixed Disk Partition Management Functions
//
///////////////////////////////////////////////////////////////////////////////////////
-BOOLEAN DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY
PartitionTableEntry, ULONG *ActivePartition);
-BOOLEAN DiskGetPartitionEntry(ULONG DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
+BOOLEAN DiskGetActivePartitionEntry(UCHAR DriveNumber, PPARTITION_TABLE_ENTRY
PartitionTableEntry, ULONG *ActivePartition);
+BOOLEAN DiskGetPartitionEntry(UCHAR DriveNumber, ULONG PartitionNumber,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOLEAN DiskGetFirstPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
BOOLEAN DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord,
PPARTITION_TABLE_ENTRY PartitionTableEntry);
-BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber,
PMASTER_BOOT_RECORD BootRecord);
+BOOLEAN DiskReadBootRecord(UCHAR DriveNumber, ULONGLONG LogicalSectorNumber,
PMASTER_BOOT_RECORD BootRecord);
ULONG LoadBootDeviceDriver(VOID);
Modified: trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/fs/ext2.h [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -75,7 +75,7 @@
ULONG free_inodes;
ULONG first_data_block;
ULONG log2_block_size;
- ULONG log2_fragment_size;
+ LONG log2_fragment_size;
ULONG blocks_per_group;
ULONG fragments_per_group;
ULONG inodes_per_group;
Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -47,7 +47,7 @@
VIDEODISPLAYMODE (*VideoSetDisplayMode)(char *DisplayMode, BOOLEAN Init);
VOID (*VideoGetDisplaySize)(PULONG Width, PULONG Height, PULONG Depth);
ULONG (*VideoGetBufferSize)(VOID);
- VOID (*VideoSetTextCursorPosition)(ULONG X, ULONG Y);
+ VOID (*VideoSetTextCursorPosition)(UCHAR X, UCHAR Y);
VOID (*VideoHideShowTextCursor)(BOOLEAN Show);
VOID (*VideoPutChar)(int Ch, UCHAR Attr, unsigned X, unsigned Y);
VOID (*VideoCopyOffScreenBufferToVRAM)(PVOID Buffer);
@@ -62,9 +62,9 @@
ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size);
- BOOLEAN (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
- BOOLEAN (*DiskGetDriveGeometry)(ULONG DriveNumber, PGEOMETRY DriveGeometry);
- ULONG (*DiskGetCacheableBlockCount)(ULONG DriveNumber);
+ BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
+ BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
+ ULONG (*DiskGetCacheableBlockCount)(UCHAR DriveNumber);
TIMEINFO* (*GetTime)(VOID);
ULONG (*GetRelativeTime)(VOID);
@@ -83,7 +83,7 @@
VIDEODISPLAYMODE MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init);
VOID MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth);
ULONG MachVideoGetBufferSize(VOID);
-VOID MachVideoSetTextCursorPosition(ULONG X, ULONG Y);
+VOID MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y);
VOID MachVideoHideShowTextCursor(BOOLEAN Show);
VOID MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y);
VOID MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer);
@@ -94,9 +94,9 @@
VOID MachBeep(VOID);
BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size);
BOOLEAN MachDiskNormalizeSystemPath(char *SystemPath, unsigned Size);
-BOOLEAN MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
-BOOLEAN MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry);
-ULONG MachDiskGetCacheableBlockCount(ULONG DriveNumber);
+BOOLEAN MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
+BOOLEAN MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
+ULONG MachDiskGetCacheableBlockCount(UCHAR DriveNumber);
VOID MachPrepareForReactOS(IN BOOLEAN Setup);
#define MachConsPutChar(Ch) MachVtbl.ConsPutChar(Ch)
Modified: trunk/reactos/boot/freeldr/freeldr/include/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/mm.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/mm.h [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -54,6 +54,7 @@
#define MM_PAGE_SIZE 4096
#define MM_PAGE_MASK 0xFFF
#define MM_PAGE_SHIFT 12
+// FIXME: freeldr implementation uses ULONG for page numbers
#define MM_MAX_PAGE 0xFFFFFFFFFFFFF
#define MM_SIZE_TO_PAGES(a) \
Modified: trunk/reactos/boot/freeldr/freeldr/include/reactos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/reactos.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/reactos.h [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -81,9 +81,9 @@
OUT ULONG* z,
OUT ULONG* Partition,
OUT ULONG *PathSyntax);
-BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG*
BootPartition);
-VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, ULONG Disk, ULONG Partition);
-ULONG ConvertArcNameToBiosDriveNumber(PCHAR ArcPath);
+BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, UCHAR* BootDrive, ULONG*
BootPartition);
+VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition);
+UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath);
///////////////////////////////////////////////////////////////////////////////////////
//
Modified: trunk/reactos/boot/freeldr/freeldr/machine.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machi…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -86,7 +86,7 @@
}
VOID
-MachVideoSetTextCursorPosition(ULONG X, ULONG Y)
+MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y)
{
MachVtbl.VideoSetTextCursorPosition(X, Y);
}
@@ -152,19 +152,19 @@
}
BOOLEAN
-MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount,
PVOID Buffer)
+MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount,
PVOID Buffer)
{
return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount,
Buffer);
}
BOOLEAN
-MachDiskGetDriveGeometry(ULONG DriveNumber, PGEOMETRY DriveGeometry)
+MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry)
{
return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry);
}
ULONG
-MachDiskGetCacheableBlockCount(ULONG DriveNumber)
+MachDiskGetCacheableBlockCount(UCHAR DriveNumber)
{
return MachVtbl.DiskGetCacheableBlockCount(DriveNumber);
}
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -21,7 +21,7 @@
#include <freeldr.h>
-BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG*
BootPartition)
+BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, UCHAR* BootDrive, ULONG*
BootPartition)
{
char *p;
@@ -160,8 +160,9 @@
return FALSE;
}
+
#if 0
-VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, ULONG Disk, ULONG Partition)
+VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition)
{
char tmp[50];
@@ -197,10 +198,10 @@
}
}
-ULONG ConvertArcNameToBiosDriveNumber(PCHAR ArcPath)
+UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath)
{
char * p;
- ULONG DriveNumber = 0;
+ UCHAR DriveNumber = 0;
if (_strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0)
return 0;
Modified: trunk/reactos/boot/freeldr/freeldr/video/fade.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/video…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/video/fade.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/video/fade.c [iso-8859-1] Sun Jul 3 23:01:39 2011
@@ -24,7 +24,7 @@
VOID VideoSetAllColorsToBlack(ULONG ColorCount)
{
- ULONG Color;
+ UCHAR Color;
MachVideoSync();
@@ -37,7 +37,7 @@
VOID VideoFadeIn(PPALETTE_ENTRY Palette, ULONG ColorCount)
{
ULONG Index;
- ULONG Color;
+ UCHAR Color;
PPALETTE_ENTRY PaletteColors;
PaletteColors = MmHeapAlloc(sizeof(PALETTE_ENTRY) * ColorCount);
@@ -97,7 +97,7 @@
VOID VideoFadeOut(ULONG ColorCount)
{
ULONG Index;
- ULONG Color;
+ UCHAR Color;
UCHAR Red;
UCHAR Green;
UCHAR Blue;
Modified: trunk/reactos/boot/freeldr/freeldr/video/palette.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/video…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/video/palette.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/video/palette.c [iso-8859-1] Sun Jul 3 23:01:39
2011
@@ -24,7 +24,7 @@
for (Color=0; Color<ColorCount; Color++)
{
- MachVideoGetPaletteColor(Color, &Palette[Color].Red, &Palette[Color].Green,
&Palette[Color].Blue);
+ MachVideoGetPaletteColor((UCHAR)Color, &Palette[Color].Red,
&Palette[Color].Green, &Palette[Color].Blue);
}
}
@@ -36,7 +36,7 @@
for (Color=0; Color<ColorCount; Color++)
{
- MachVideoSetPaletteColor(Color, Palette[Color].Red, Palette[Color].Green,
Palette[Color].Blue);
+ MachVideoSetPaletteColor((UCHAR)Color, Palette[Color].Red, Palette[Color].Green,
Palette[Color].Blue);
}
}
#endif
Modified: trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c [iso-8859-1] Sun Jul 3
23:01:39 2011
@@ -277,7 +277,7 @@
GDTIDT GdtDesc, IdtDesc, OldIdt;
PKGDTENTRY pGdt;
PKIDTENTRY pIdt;
- ULONG Ldt = 0;
+ USHORT Ldt = 0;
//ULONG i;
DPRINTM(DPRINT_WINDOWS, "GDtIdt %p, Pcr %p, Tss 0x%08X\n",