mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:IO] IopVerifyDiskSignature(): simplify code and SAL2-annotate
This commit is contained in:
parent
85d338ed65
commit
5e3f3f59df
2 changed files with 8 additions and 13 deletions
|
@ -799,12 +799,10 @@ IoInitSystem(
|
|||
);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
IopVerifyDiskSignature(
|
||||
IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout,
|
||||
IN PARC_DISK_SIGNATURE ArcDiskSignature,
|
||||
OUT PULONG Signature
|
||||
);
|
||||
_In_ PDRIVE_LAYOUT_INFORMATION_EX DriveLayout,
|
||||
_In_ PARC_DISK_SIGNATURE ArcDiskSignature,
|
||||
_Out_ PULONG Signature);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
|
|
|
@ -946,10 +946,10 @@ IopReassignSystemRoot(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
|||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
IopVerifyDiskSignature(IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout,
|
||||
IN PARC_DISK_SIGNATURE ArcDiskSignature,
|
||||
OUT PULONG Signature)
|
||||
IopVerifyDiskSignature(
|
||||
_In_ PDRIVE_LAYOUT_INFORMATION_EX DriveLayout,
|
||||
_In_ PARC_DISK_SIGNATURE ArcDiskSignature,
|
||||
_Out_ PULONG Signature)
|
||||
{
|
||||
/* Fail if the partition table is invalid */
|
||||
if (!ArcDiskSignature->ValidPartitionTable)
|
||||
|
@ -972,10 +972,7 @@ IopVerifyDiskSignature(IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout,
|
|||
{
|
||||
/* Verify whether the signature is GPT and compare the GUID */
|
||||
if (ArcDiskSignature->IsGpt &&
|
||||
(((PULONG)ArcDiskSignature->GptSignature)[0] == DriveLayout->Gpt.DiskId.Data1 &&
|
||||
((PUSHORT)ArcDiskSignature->GptSignature)[2] == DriveLayout->Gpt.DiskId.Data2 &&
|
||||
((PUSHORT)ArcDiskSignature->GptSignature)[3] == DriveLayout->Gpt.DiskId.Data3 &&
|
||||
((PULONGLONG)ArcDiskSignature->GptSignature)[1] == ((PULONGLONG)DriveLayout->Gpt.DiskId.Data4)[0]))
|
||||
IsEqualGUID((PGUID)&ArcDiskSignature->GptSignature, &DriveLayout->Gpt.DiskId))
|
||||
{
|
||||
/* There is no signature to return, just zero it */
|
||||
if (Signature)
|
||||
|
|
Loading…
Reference in a new issue