Reformat to the generic style of this file (indentation=3spaces, no tabs, functions declarations generalized).

Not everything maybe fixed, but at least it isn't a mess of TABs and spaces anymore.

*No code changes, pure formatting*

svn path=/trunk/; revision=19953
This commit is contained in:
Aleksey Bragin 2005-12-07 18:33:12 +00:00
parent db41ecbbff
commit 2e8b6ad70c

View file

@ -109,9 +109,9 @@ IopSetRootDeviceInstanceData(PDEVICE_NODE DeviceNode);
/* FUNCTIONS *****************************************************************/
PDEVICE_NODE FASTCALL
IopGetDeviceNode(
PDEVICE_OBJECT DeviceObject)
PDEVICE_NODE
FASTCALL
IopGetDeviceNode(PDEVICE_OBJECT DeviceObject)
{
return ((PEXTENDED_DEVOBJ_EXTENSION)DeviceObject->DeviceObjectExtension)->DeviceNode;
}
@ -147,8 +147,7 @@ IopQueryDeviceCapabilities(PDEVICE_NODE DeviceNode,
*/
VOID
STDCALL
IoInvalidateDeviceRelations(
IN PDEVICE_OBJECT DeviceObject,
IoInvalidateDeviceRelations(IN PDEVICE_OBJECT DeviceObject,
IN DEVICE_RELATION_TYPE Type)
{
IopInvalidateDeviceRelations(IopGetDeviceNode(DeviceObject), Type);
@ -159,8 +158,7 @@ IoInvalidateDeviceRelations(
*/
NTSTATUS
STDCALL
IoGetDeviceProperty(
IN PDEVICE_OBJECT DeviceObject,
IoGetDeviceProperty(IN PDEVICE_OBJECT DeviceObject,
IN DEVICE_REGISTRY_PROPERTY DeviceProperty,
IN ULONG BufferLength,
OUT PVOID PropertyBuffer,
@ -218,7 +216,6 @@ IoGetDeviceProperty(
break;
case DevicePropertyAddress:
/* Query the device caps */
Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps);
if (NT_SUCCESS(Status) && (DeviceCaps.Address != (ULONG)-1))
@ -297,8 +294,7 @@ IoGetDeviceProperty(
KeyNameBuffer = ExAllocatePool(PagedPool,
(49 * sizeof(WCHAR)) + DeviceNode->InstancePath.Length);
DPRINT("KeyNameBuffer: 0x%p, value %S\n",
KeyNameBuffer, RegistryPropertyName);
DPRINT("KeyNameBuffer: 0x%p, value %S\n", KeyNameBuffer, RegistryPropertyName);
if (KeyNameBuffer == NULL)
return STATUS_INSUFFICIENT_RESOURCES;
@ -412,8 +408,7 @@ IoGetDeviceProperty(
*/
VOID
STDCALL
IoInvalidateDeviceState(
IN PDEVICE_OBJECT PhysicalDeviceObject)
IoInvalidateDeviceState(IN PDEVICE_OBJECT PhysicalDeviceObject)
{
}
@ -434,8 +429,7 @@ IoInvalidateDeviceState(
*/
NTSTATUS
STDCALL
IoOpenDeviceRegistryKey(
IN PDEVICE_OBJECT DeviceObject,
IoOpenDeviceRegistryKey(IN PDEVICE_OBJECT DeviceObject,
IN ULONG DevInstKeyType,
IN ACCESS_MASK DesiredAccess,
OUT PHANDLE DevInstRegKey)
@ -567,9 +561,7 @@ IoOpenDeviceRegistryKey(
*/
VOID
STDCALL
IoRequestDeviceEject(
IN PDEVICE_OBJECT PhysicalDeviceObject
)
IoRequestDeviceEject(IN PDEVICE_OBJECT PhysicalDeviceObject)
{
UNIMPLEMENTED;
}
@ -789,8 +781,7 @@ IopFreeDeviceNode(PDEVICE_NODE DeviceNode)
}
NTSTATUS
IopInitiatePnpIrp(
PDEVICE_OBJECT DeviceObject,
IopInitiatePnpIrp(PDEVICE_OBJECT DeviceObject,
PIO_STATUS_BLOCK IoStatusBlock,
ULONG MinorFunction,
PIO_STACK_LOCATION Stack OPTIONAL)
@ -828,8 +819,7 @@ IopInitiatePnpIrp(
if (Stack)
{
RtlMoveMemory(
&IrpSp->Parameters,
RtlMoveMemory(&IrpSp->Parameters,
&Stack->Parameters,
sizeof(Stack->Parameters));
}
@ -837,8 +827,7 @@ IopInitiatePnpIrp(
Status = IoCallDriver(TopDeviceObject, Irp);
if (Status == STATUS_PENDING)
{
KeWaitForSingleObject(
&Event,
KeWaitForSingleObject(&Event,
Executive,
KernelMode,
FALSE,
@ -853,8 +842,7 @@ IopInitiatePnpIrp(
NTSTATUS
IopTraverseDeviceTreeNode(
PDEVICETREE_TRAVERSE_CONTEXT Context)
IopTraverseDeviceTreeNode(PDEVICETREE_TRAVERSE_CONTEXT Context)
{
PDEVICE_NODE ParentDeviceNode;
PDEVICE_NODE ChildDeviceNode;
@ -890,8 +878,7 @@ IopTraverseDeviceTreeNode(
NTSTATUS
IopTraverseDeviceTree(
PDEVICETREE_TRAVERSE_CONTEXT Context)
IopTraverseDeviceTree(PDEVICETREE_TRAVERSE_CONTEXT Context)
{
NTSTATUS Status;
@ -916,7 +903,8 @@ IopTraverseDeviceTree(
}
static NTSTATUS
static
NTSTATUS
IopCreateDeviceKeyPath(PWSTR Path,
PHANDLE Handle)
{
@ -994,7 +982,8 @@ IopCreateDeviceKeyPath(PWSTR Path,
}
static NTSTATUS
static
NTSTATUS
IopSetDeviceInstanceData(HANDLE InstanceKey,
PDEVICE_NODE DeviceNode)
{
@ -1008,8 +997,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
DPRINT("IopSetDeviceInstanceData() called\n");
/* Create the 'LogConf' key */
RtlInitUnicodeString(&KeyName,
L"LogConf");
RtlInitUnicodeString(&KeyName, L"LogConf");
InitializeObjectAttributes(&ObjectAttributes,
&KeyName,
OBJ_CASE_INSENSITIVE,
@ -1032,8 +1020,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
{
ListSize = CM_RESOURCE_LIST_SIZE(DeviceNode->BootResources);
RtlInitUnicodeString(&KeyName,
L"BootConfig");
RtlInitUnicodeString(&KeyName, L"BootConfig");
Status = ZwSetValueKey(LogConfKey,
&KeyName,
0,
@ -1047,8 +1034,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
if (DeviceNode->ResourceRequirements != NULL &&
DeviceNode->ResourceRequirements->ListSize != 0)
{
RtlInitUnicodeString(&KeyName,
L"BasicConfigVector");
RtlInitUnicodeString(&KeyName, L"BasicConfigVector");
Status = ZwSetValueKey(LogConfKey,
&KeyName,
0,
@ -1102,8 +1088,7 @@ IopSetDeviceInstanceData(HANDLE InstanceKey,
NTSTATUS
IopAssignDeviceResources(
PDEVICE_NODE DeviceNode)
IopAssignDeviceResources(PDEVICE_NODE DeviceNode)
{
PIO_RESOURCE_LIST ResourceList;
PIO_RESOURCE_DESCRIPTOR ResourceDescriptor;
@ -1362,8 +1347,7 @@ ByeBye:
*/
NTSTATUS
IopGetParentIdPrefix(
PDEVICE_NODE DeviceNode,
IopGetParentIdPrefix(PDEVICE_NODE DeviceNode,
PUNICODE_STRING ParentIdPrefix)
{
ULONG KeyNameBufferLength;
@ -1438,9 +1422,10 @@ IopGetParentIdPrefix(
RtlInitUnicodeString(&KeyValue, (PWSTR)ParentIdPrefixInformation->Data);
/* 3. Try to write the ParentIdPrefix to registry */
Status = ZwSetValueKey(
hKey, &ValueName,
0, REG_SZ,
Status = ZwSetValueKey(hKey,
&ValueName,
0,
REG_SZ,
(PVOID)KeyValue.Buffer,
(wcslen(KeyValue.Buffer) + 1) * sizeof(WCHAR));
@ -1478,8 +1463,7 @@ cleanup:
*/
NTSTATUS
IopActionInterrogateDeviceStack(
PDEVICE_NODE DeviceNode,
IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode,
PVOID Context)
{
IO_STATUS_BLOCK IoStatusBlock;
@ -1542,8 +1526,7 @@ IopActionInterrogateDeviceStack(
DPRINT("Sending IRP_MN_QUERY_ID.BusQueryDeviceID to device stack\n");
Stack.Parameters.QueryId.IdType = BusQueryDeviceID;
Status = IopInitiatePnpIrp(
DeviceNode->PhysicalDeviceObject,
Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject,
&IoStatusBlock,
IRP_MN_QUERY_ID,
&Stack);
@ -1586,8 +1569,7 @@ IopActionInterrogateDeviceStack(
DPRINT("Sending IRP_MN_QUERY_ID.BusQueryInstanceID to device stack\n");
Stack.Parameters.QueryId.IdType = BusQueryInstanceID;
Status = IopInitiatePnpIrp(
DeviceNode->PhysicalDeviceObject,
Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject,
&IoStatusBlock,
IRP_MN_QUERY_ID,
&Stack);
@ -1631,8 +1613,7 @@ IopActionInterrogateDeviceStack(
(49 * sizeof(WCHAR)) + DeviceNode->InstancePath.Length);
wcscpy(KeyBuffer, L"\\Registry\\Machine\\System\\CurrentControlSet\\Enum\\");
wcscat(KeyBuffer, DeviceNode->InstancePath.Buffer);
Status = IopCreateDeviceKeyPath(KeyBuffer,
&InstanceKey);
Status = IopCreateDeviceKeyPath(KeyBuffer, &InstanceKey);
ExFreePool(KeyBuffer);
if (!NT_SUCCESS(Status))
{
@ -1642,8 +1623,7 @@ IopActionInterrogateDeviceStack(
{
/* Set 'Capabilities' value */
RtlInitUnicodeString(&ValueName,
L"Capabilities");
RtlInitUnicodeString(&ValueName, L"Capabilities");
Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
@ -1654,8 +1634,7 @@ IopActionInterrogateDeviceStack(
/* Set 'UINumber' value */
if (DeviceCapabilities.UINumber != (ULONG)-1)
{
RtlInitUnicodeString(&ValueName,
L"UINumber");
RtlInitUnicodeString(&ValueName, L"UINumber");
Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
@ -1668,8 +1647,7 @@ IopActionInterrogateDeviceStack(
DPRINT("Sending IRP_MN_QUERY_ID.BusQueryHardwareIDs to device stack\n");
Stack.Parameters.QueryId.IdType = BusQueryHardwareIDs;
Status = IopInitiatePnpIrp(
DeviceNode->PhysicalDeviceObject,
Status = IopInitiatePnpIrp(DeviceNode->PhysicalDeviceObject,
&IoStatusBlock,
IRP_MN_QUERY_ID,
&Stack);
@ -1693,8 +1671,7 @@ IopActionInterrogateDeviceStack(
DPRINT("TotalLength: %hu\n", TotalLength);
DPRINT("\n");
RtlInitUnicodeString(&ValueName,
L"HardwareID");
RtlInitUnicodeString(&ValueName, L"HardwareID");
Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
@ -1739,8 +1716,7 @@ IopActionInterrogateDeviceStack(
DPRINT("TotalLength: %hu\n", TotalLength);
DPRINT("\n");
RtlInitUnicodeString(&ValueName,
L"CompatibleIDs");
RtlInitUnicodeString(&ValueName, L"CompatibleIDs");
Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
@ -1803,8 +1779,7 @@ IopActionInterrogateDeviceStack(
if (NT_SUCCESS(Status))
{
DPRINT("LocationInformation: %S\n", (PWSTR)IoStatusBlock.Information);
RtlInitUnicodeString(&ValueName,
L"LocationInformation");
RtlInitUnicodeString(&ValueName, L"LocationInformation");
Status = ZwSetValueKey(InstanceKey,
&ValueName,
0,
@ -1927,8 +1902,7 @@ IopActionInterrogateDeviceStack(
*/
NTSTATUS
IopActionConfigureChildServices(
PDEVICE_NODE DeviceNode,
IopActionConfigureChildServices(PDEVICE_NODE DeviceNode,
PVOID Context)
{
RTL_QUERY_REGISTRY_TABLE QueryTable[3];
@ -2053,8 +2027,7 @@ IopActionConfigureChildServices(
*/
NTSTATUS
IopActionInitChildServices(
PDEVICE_NODE DeviceNode,
IopActionInitChildServices(PDEVICE_NODE DeviceNode,
PVOID Context,
BOOLEAN BootDrivers)
{
@ -2159,8 +2132,7 @@ IopActionInitChildServices(
*/
NTSTATUS
IopActionInitAllServices(
PDEVICE_NODE DeviceNode,
IopActionInitAllServices(PDEVICE_NODE DeviceNode,
PVOID Context)
{
return IopActionInitChildServices(DeviceNode, Context, FALSE);
@ -2174,8 +2146,7 @@ IopActionInitAllServices(
* BootDrivers = TRUE.
*/
NTSTATUS
IopActionInitBootServices(
PDEVICE_NODE DeviceNode,
IopActionInitBootServices(PDEVICE_NODE DeviceNode,
PVOID Context)
{
return IopActionInitChildServices(DeviceNode, Context, TRUE);
@ -2198,8 +2169,7 @@ IopActionInitBootServices(
* Status
*/
NTSTATUS
IopInitializePnpServices(
IN PDEVICE_NODE DeviceNode,
IopInitializePnpServices(IN PDEVICE_NODE DeviceNode,
IN BOOLEAN BootDrivers)
{
DEVICETREE_TRAVERSE_CONTEXT Context;
@ -2228,8 +2198,7 @@ IopInitializePnpServices(
NTSTATUS
IopInvalidateDeviceRelations(
IN PDEVICE_NODE DeviceNode,
IopInvalidateDeviceRelations(IN PDEVICE_NODE DeviceNode,
IN DEVICE_RELATION_TYPE Type)
{
DEVICETREE_TRAVERSE_CONTEXT Context;
@ -2377,7 +2346,9 @@ IopInvalidateDeviceRelations(
}
static NTSTATUS INIT_FUNCTION
static
NTSTATUS
INIT_FUNCTION
IopSetRootDeviceInstanceData(PDEVICE_NODE DeviceNode)
{
#if 0