mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 12:23:30 +00:00
- disk.sys: Don't fail IOCTL_GET_PARTITION_INFO for Partition 0. This is perfectly valid (and needed for some code I'll add later).
- IopGetDiskInformation: Treat the partition buffer as a simple PULONG array. - KeUpdateSystemTime: Fix memory addressing to silence GAS compile-time warning. svn path=/trunk/; revision=24686
This commit is contained in:
@@ -1129,10 +1129,10 @@ DiskClassDeviceControl(IN PDEVICE_OBJECT DeviceObject,
|
||||
{
|
||||
Status = STATUS_INFO_LENGTH_MISMATCH;
|
||||
}
|
||||
else if (DiskData->PartitionNumber == 0)
|
||||
{
|
||||
Status = STATUS_INVALID_DEVICE_REQUEST;
|
||||
}
|
||||
//else if (DiskData->PartitionNumber == 0)
|
||||
// {
|
||||
// Status = STATUS_INVALID_DEVICE_REQUEST;
|
||||
//}
|
||||
else
|
||||
{
|
||||
PPARTITION_INFORMATION PartitionInfo;
|
||||
|
||||
@@ -134,7 +134,7 @@ IopGetDiskInformation(IN ULONG i,
|
||||
PIRP Irp;
|
||||
IO_STATUS_BLOCK StatusBlock;
|
||||
LARGE_INTEGER PartitionOffset;
|
||||
PPARTITION_SECTOR PartitionBuffer;
|
||||
PULONG PartitionBuffer;
|
||||
|
||||
/* Build the name */
|
||||
sprintf(Buffer, "\\Device\\Harddisk%lu\\Partition0", i);
|
||||
@@ -241,10 +241,7 @@ IopGetDiskInformation(IN ULONG i,
|
||||
|
||||
/* Calculate the MBR checksum */
|
||||
Checksum = 0;
|
||||
for (j = 0; j < 128; j++)
|
||||
{
|
||||
Checksum += ((PULONG)PartitionBuffer)[j];
|
||||
}
|
||||
for (j = 0; j < 128; j++) Checksum += PartitionBuffer[j];
|
||||
|
||||
/* Save the signature and checksum */
|
||||
*CheckSum = ~Checksum + 1;
|
||||
|
||||
@@ -207,12 +207,12 @@ _KeUpdateSystemTime@0:
|
||||
mov [_KeTickCount+4], edx
|
||||
|
||||
/* Store in in shared data too */
|
||||
mov [USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+8], edx
|
||||
mov [USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT], ecx
|
||||
mov [USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+4], edx
|
||||
mov ds:[USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+8], edx
|
||||
mov ds:[USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT], ecx
|
||||
mov ds:[USER_SHARED_DATA+USER_SHARED_DATA_TICK_COUNT+4], edx
|
||||
|
||||
/* FIXME: HACK */
|
||||
mov [USER_SHARED_DATA], ecx
|
||||
mov ds:[USER_SHARED_DATA], ecx
|
||||
|
||||
IncompleteTick:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user