mirror of
https://github.com/reactos/reactos.git
synced 2025-06-08 02:40:32 +00:00
[PCMCIA]
- Check if the IOCTL interface should be enabled (not used yet) svn path=/trunk/; revision=46913
This commit is contained in:
parent
9ce679f7cf
commit
b3be7aba54
1 changed files with 26 additions and 1 deletions
|
@ -11,6 +11,8 @@
|
||||||
//#define NDEBUG
|
//#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
|
BOOLEAN IoctlEnabled;
|
||||||
|
|
||||||
NTSTATUS
|
NTSTATUS
|
||||||
NTAPI
|
NTAPI
|
||||||
PcmciaCreateClose(PDEVICE_OBJECT DeviceObject,
|
PcmciaCreateClose(PDEVICE_OBJECT DeviceObject,
|
||||||
|
@ -202,6 +204,11 @@ NTAPI
|
||||||
DriverEntry(PDRIVER_OBJECT DriverObject,
|
DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
PUNICODE_STRING RegistryPath)
|
PUNICODE_STRING RegistryPath)
|
||||||
{
|
{
|
||||||
|
RTL_QUERY_REGISTRY_TABLE QueryTable[2];
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
DPRINT1("PCMCIA: DriverEntry\n");
|
||||||
|
|
||||||
DriverObject->MajorFunction[IRP_MJ_CREATE] = PcmciaCreateClose;
|
DriverObject->MajorFunction[IRP_MJ_CREATE] = PcmciaCreateClose;
|
||||||
DriverObject->MajorFunction[IRP_MJ_CLOSE] = PcmciaCreateClose;
|
DriverObject->MajorFunction[IRP_MJ_CLOSE] = PcmciaCreateClose;
|
||||||
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = PcmciaDeviceControl;
|
DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = PcmciaDeviceControl;
|
||||||
|
@ -211,7 +218,25 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
|
||||||
DriverObject->DriverExtension->AddDevice = PcmciaAddDevice;
|
DriverObject->DriverExtension->AddDevice = PcmciaAddDevice;
|
||||||
DriverObject->DriverUnload = PcmciaUnload;
|
DriverObject->DriverUnload = PcmciaUnload;
|
||||||
|
|
||||||
DPRINT1("PCMCIA: DriverEntry\n");
|
RtlZeroMemory(QueryTable, sizeof(RTL_QUERY_REGISTRY_TABLE) * 2);
|
||||||
|
|
||||||
|
QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_REQUIRED;
|
||||||
|
QueryTable[0].Name = L"IoctlInterface";
|
||||||
|
QueryTable[0].EntryContext = &IoctlEnabled;
|
||||||
|
|
||||||
|
Status = RtlQueryRegistryValues(RTL_REGISTRY_SERVICES,
|
||||||
|
L"Pcmcia\\Parameters",
|
||||||
|
QueryTable,
|
||||||
|
NULL,
|
||||||
|
NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
/* Key not present so assume disabled */
|
||||||
|
IoctlEnabled = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DPRINT("PCMCIA: Ioctl interface %s\n",
|
||||||
|
(IoctlEnabled ? "enabled" : "disabled"));
|
||||||
|
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue