mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +00:00
[NTOS] Code formatting only.
This commit is contained in:
parent
969de9062c
commit
d3a97e2228
|
@ -1503,8 +1503,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
if (!Offset.QuadPart)
|
if (!Offset.QuadPart)
|
||||||
{
|
{
|
||||||
/* Then read the signature off the disk */
|
/* Then read the signature off the disk */
|
||||||
(*PartitionBuffer)->Signature = ((PULONG)Buffer)
|
(*PartitionBuffer)->Signature = ((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1];
|
||||||
[PARTITION_TABLE_OFFSET / 2 - 1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the partition descriptor array */
|
/* Get the partition descriptor array */
|
||||||
|
@ -1540,7 +1539,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
/* Make sure that the partition is valid, unless it's the first */
|
/* Make sure that the partition is valid, unless it's the first */
|
||||||
if (!(HalpIsValidPartitionEntry(PartitionDescriptor,
|
if (!(HalpIsValidPartitionEntry(PartitionDescriptor,
|
||||||
MaxOffset,
|
MaxOffset,
|
||||||
MaxSector)) && !(j))
|
MaxSector)) && (j == 0))
|
||||||
{
|
{
|
||||||
/* It's invalid, so fail */
|
/* It's invalid, so fail */
|
||||||
IsValid = FALSE;
|
IsValid = FALSE;
|
||||||
|
@ -1722,9 +1721,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
|
|
||||||
/* Check if this is a removable device that's probably a super-floppy */
|
/* Check if this is a removable device that's probably a super-floppy */
|
||||||
if ((DiskGeometry.MediaType == RemovableMedia) &&
|
if ((DiskGeometry.MediaType == RemovableMedia) &&
|
||||||
!(j) &&
|
(j == 0) && (MbrFound) && (IsEmpty))
|
||||||
(MbrFound) &&
|
|
||||||
(IsEmpty))
|
|
||||||
{
|
{
|
||||||
/* Read the jump bytes to detect super-floppy */
|
/* Read the jump bytes to detect super-floppy */
|
||||||
if ((BootSectorInfo->JumpByte[0] == 0xeb) ||
|
if ((BootSectorInfo->JumpByte[0] == 0xeb) ||
|
||||||
|
@ -2133,7 +2130,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
|
||||||
if (((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1] !=
|
if (((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1] !=
|
||||||
PartitionBuffer->Signature)
|
PartitionBuffer->Signature)
|
||||||
{
|
{
|
||||||
/* Then write the signature and now w need a rewrite */
|
/* Then write the signature and now we need a rewrite */
|
||||||
((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1] =
|
((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1] =
|
||||||
PartitionBuffer->Signature;
|
PartitionBuffer->Signature;
|
||||||
DoRewrite = TRUE;
|
DoRewrite = TRUE;
|
||||||
|
|
|
@ -210,7 +210,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Compute how much mem we'll need */
|
/* Compute how much memory we'll need */
|
||||||
RequiredLength = DataBuffer->Reserved + Length + sizeof(UNICODE_NULL);
|
RequiredLength = DataBuffer->Reserved + Length + sizeof(UNICODE_NULL);
|
||||||
|
|
||||||
/* Check if FileObject can already hold what we need */
|
/* Check if FileObject can already hold what we need */
|
||||||
|
@ -224,7 +224,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
|
||||||
NewBuffer = ExAllocatePoolWithTag(PagedPool, RequiredLength, TAG_IO_NAME);
|
NewBuffer = ExAllocatePoolWithTag(PagedPool, RequiredLength, TAG_IO_NAME);
|
||||||
if (NewBuffer == NULL)
|
if (NewBuffer == NULL)
|
||||||
{
|
{
|
||||||
Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
|
Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
|
||||||
/* Everything went right */
|
/* Everything went right */
|
||||||
if (NT_SUCCESS(Irp->IoStatus.Status))
|
if (NT_SUCCESS(Irp->IoStatus.Status))
|
||||||
{
|
{
|
||||||
/* Copy reserved */
|
/* Copy the reserved data */
|
||||||
if (DataBuffer->Reserved)
|
if (DataBuffer->Reserved)
|
||||||
{
|
{
|
||||||
RtlMoveMemory((PWSTR)((ULONG_PTR)NewBuffer + Length),
|
RtlMoveMemory((PWSTR)((ULONG_PTR)NewBuffer + Length),
|
||||||
|
@ -241,7 +241,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
|
||||||
DataBuffer->Reserved);
|
DataBuffer->Reserved);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Then, buffer */
|
/* Then the buffer */
|
||||||
if (Length)
|
if (Length)
|
||||||
{
|
{
|
||||||
RtlCopyMemory(NewBuffer, Buffer, Length);
|
RtlCopyMemory(NewBuffer, Buffer, Length);
|
||||||
|
@ -958,12 +958,9 @@ IopParseDevice(IN PVOID ParseObject,
|
||||||
if (RemainingName->Length)
|
if (RemainingName->Length)
|
||||||
{
|
{
|
||||||
/* Setup the unicode string */
|
/* Setup the unicode string */
|
||||||
FileObject->FileName.MaximumLength = RemainingName->Length +
|
FileObject->FileName.MaximumLength = RemainingName->Length + sizeof(WCHAR);
|
||||||
sizeof(WCHAR);
|
|
||||||
FileObject->FileName.Buffer = ExAllocatePoolWithTag(PagedPool,
|
FileObject->FileName.Buffer = ExAllocatePoolWithTag(PagedPool,
|
||||||
FileObject->
|
FileObject->FileName.MaximumLength,
|
||||||
FileName.
|
|
||||||
MaximumLength,
|
|
||||||
TAG_IO_NAME);
|
TAG_IO_NAME);
|
||||||
if (!FileObject->FileName.Buffer)
|
if (!FileObject->FileName.Buffer)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue