- 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:
Alex Ionescu
2006-11-05 20:43:07 +00:00
parent 6e282d4611
commit 3065170214
3 changed files with 10 additions and 13 deletions
+4 -4
View File
@@ -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;
+2 -5
View File
@@ -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;
+4 -4
View File
@@ -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: