[NTOSKRNL]

Implemented IopFetchConfigurationInformation(), IopCreateArcNamesCd(), IopCreateArcNamesDisk(), IopVerifyDiskSignature()
Removed IopApplyRosCdromArcHack(), IopGetDiskInformation(), IopAssignArcNamesToCdrom()
Finally, rewritten IopCreateArcNames()

To make it short, this is the rewrite of ARC names handling in the kernel.
This brings our kernel to a higher state of existence. Indeed, it's leaving NT4 design for a proper NT5.2 design, with less hacks, less ROS specific stuff and such.
This code handles the mount manager we don't have yet.

svn path=/trunk/; revision=49131
This commit is contained in:
Pierre Schweitzer 2010-10-12 20:29:50 +00:00
parent 82e5bca0e7
commit 6d0861e9ed
4 changed files with 815 additions and 550 deletions

View file

@ -10,5 +10,9 @@
/* FIXME: shouldn't go there! */
DEFINE_GUID(GUID_DEVICE_SYS_BUTTON,
0x4AFA3D53L, 0x74A7, 0x11d0, 0xbe, 0x5e, 0x00, 0xA0, 0xC9, 0x06, 0x28, 0x57);
DEFINE_GUID(GUID_DEVINTERFACE_DISK,
0x53f56307L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
DEFINE_GUID(GUID_DEVINTERFACE_CDROM,
0x53f56308L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
/* EOF */

View file

@ -741,6 +741,14 @@ IoInitSystem(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
BOOLEAN
NTAPI
IopVerifyDiskSignature(
IN PDRIVE_LAYOUT_INFORMATION_EX DriveLayout,
IN PARC_DISK_SIGNATURE ArcDiskSignature,
OUT PULONG Signature
);
//
// Device/Volume Routines
//
@ -1165,8 +1173,17 @@ IopStartRamdisk(
IN PLOADER_PARAMETER_BLOCK LoaderBlock
);
//
// Configuration Routines
//
NTSTATUS
NTAPI
IopFetchConfigurationInformation(OUT PWSTR * SymbolicLinkList,
IN GUID Guid,
IN ULONG ExpectedInterfaces,
IN PULONG Interfaces
);
VOID
NTAPI
IopStoreSystemPartitionInformation(IN PUNICODE_STRING NtSystemPartitionDeviceName,

File diff suppressed because it is too large Load diff

View file

@ -651,6 +651,47 @@ IopQueryBusDescription(
return Status;
}
NTSTATUS
NTAPI
IopFetchConfigurationInformation(OUT PWSTR * SymbolicLinkList,
IN GUID Guid,
IN ULONG ExpectedInterfaces,
IN PULONG Interfaces)
{
NTSTATUS Status;
ULONG IntInterfaces = 0;
PWSTR IntSymbolicLinkList;
/* Get the associated enabled interfaces with the given GUID */
Status = IoGetDeviceInterfaces(&Guid, NULL, 0, SymbolicLinkList);
if (!NT_SUCCESS(Status))
{
/* Zero output and leave */
if (SymbolicLinkList != 0)
{
*SymbolicLinkList = 0;
}
return STATUS_UNSUCCESSFUL;
}
IntSymbolicLinkList = *SymbolicLinkList;
/* Count the number of enabled interfaces by counting the number of symbolic links */
while (*IntSymbolicLinkList != UNICODE_NULL)
{
IntInterfaces++;
IntSymbolicLinkList += wcslen(IntSymbolicLinkList) + (sizeof(UNICODE_NULL) / sizeof(WCHAR));
}
/* Matching result will define the result */
Status = (IntInterfaces >= ExpectedInterfaces) ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
/* Finally, give back to the caller the number of found interfaces */
*Interfaces = IntInterfaces;
return Status;
}
VOID
NTAPI
IopStoreSystemPartitionInformation(IN PUNICODE_STRING NtSystemPartitionDeviceName,