mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NTOS:IO/FSTUB] Fix the determination of 'SingleDisk' in IoGetBootDiskInformation().
The purpose of 'SingleDisk' is the same as in the IopCreateArcNames() function. It is an optimization for that when looking up the firmware-recognized ARC disks list, in order to match one of these with the current NT disk being analysed (see e.g. also in IopCreateArcNamesDisk()), we avoid a possible IopVerifyDiskSignature() call and directly build a corresponding ARC name NT symbolic link for it. 'SingleDisk' will actually be TRUE, whether the DiskSignatureListHead list is empty or contains only one element: Indeed in only both these cases, 'DiskSignatureListHead.Flink->Flink' will refer to the list head. (If the list is empty but 'SingleDisk' is TRUE, this does not matter, because the DiskSignatureListHead looking-up loop never starts.)
This commit is contained in:
parent
99078646c3
commit
fdd74eb97e
2 changed files with 7 additions and 5 deletions
|
@ -1866,13 +1866,15 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
|
|||
|
||||
/* Init some useful stuff:
|
||||
* Get ARC disks information
|
||||
* Check whether we have a single disk
|
||||
* Check whether we have a single disk on the machine
|
||||
* Check received structure size (extended or not?)
|
||||
* Init boot strings (system/boot)
|
||||
* Finaly, get disk count
|
||||
*/
|
||||
ArcDiskInformation = IopLoaderBlock->ArcDiskInformation;
|
||||
SingleDisk = IsListEmpty(&(ArcDiskInformation->DiskSignatureListHead));
|
||||
SingleDisk = (ArcDiskInformation->DiskSignatureListHead.Flink->Flink ==
|
||||
&ArcDiskInformation->DiskSignatureListHead);
|
||||
|
||||
IsBootDiskInfoEx = (Size >= sizeof(BOOTDISK_INFORMATION_EX));
|
||||
RtlInitAnsiString(&ArcBootString, IopLoaderBlock->ArcBootDeviceName);
|
||||
RtlInitAnsiString(&ArcSystemString, IopLoaderBlock->ArcHalDeviceName);
|
||||
|
@ -2147,7 +2149,7 @@ IoGetBootDiskInformation(IN OUT PBOOTDISK_INFORMATION BootDiskInformation,
|
|||
}
|
||||
}
|
||||
|
||||
/* Finally, release drive layout structure */
|
||||
/* Finally, release drive layout */
|
||||
ExFreePool(DriveLayout);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@ IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
|||
ANSI_STRING ArcSystemString, ArcString, LanmanRedirector, LoaderPathNameA;
|
||||
|
||||
/* Check if we only have one disk on the machine */
|
||||
SingleDisk = ArcDiskInfo->DiskSignatureListHead.Flink->Flink ==
|
||||
(&ArcDiskInfo->DiskSignatureListHead);
|
||||
SingleDisk = (ArcDiskInfo->DiskSignatureListHead.Flink->Flink ==
|
||||
&ArcDiskInfo->DiskSignatureListHead);
|
||||
|
||||
/* Create the global HAL partition name */
|
||||
sprintf(Buffer, "\\ArcName\\%s", LoaderBlock->ArcHalDeviceName);
|
||||
|
|
Loading…
Reference in a new issue