mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
Hervé Poussineau <[email protected]>
No need to create \??\Mouse symlink in mouse driver, it's done in mouclass. svn path=/trunk/; revision=13323
This commit is contained in:
@@ -177,7 +177,6 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
UNICODE_STRING DeviceName;
|
||||
UNICODE_STRING SuffixString;
|
||||
UNICODE_STRING SymlinkName;
|
||||
PDEVICE_EXTENSION DeviceExtension;
|
||||
ULONG Suffix;
|
||||
NTSTATUS Status;
|
||||
@@ -213,25 +212,16 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||
}
|
||||
|
||||
ExFreePool(DeviceName.Buffer);
|
||||
ExFreePool(SuffixString.Buffer);
|
||||
|
||||
/* Couldn't create device */
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ExFreePool(SuffixString.Buffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
|
||||
|
||||
/* Create symlink */
|
||||
RtlInitUnicodeString(&SymlinkName, NULL);
|
||||
SymlinkName.MaximumLength = sizeof(L"\\??\\Mouse") + SUFFIX_MAXIMUM_SIZE + sizeof(UNICODE_NULL);
|
||||
SymlinkName.Buffer = ExAllocatePool(PagedPool, SymlinkName.MaximumLength);
|
||||
RtlAppendUnicodeToString(&SymlinkName, L"\\??\\Mouse");
|
||||
RtlAppendUnicodeToString(&DeviceName, SuffixString.Buffer);
|
||||
IoCreateSymbolicLink(&SymlinkName, &DeviceName);
|
||||
ExFreePool(SuffixString.Buffer);
|
||||
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)PS2MouseIsrDpc, DeviceObject);
|
||||
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#define SERMOUSE_COM1_SUPPORT
|
||||
/* Check for mouse on COM2? */
|
||||
/* #define SERMOUSE_COM2_SUPPORT */
|
||||
/* Create \??\Mouse* symlink for device? */
|
||||
#define SERMOUSE_MOUSESYMLINK_SUPPORT
|
||||
|
||||
/*
|
||||
* Definitions
|
||||
@@ -511,7 +509,6 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||
PDEVICE_OBJECT DeviceObject;
|
||||
UNICODE_STRING DeviceName;
|
||||
UNICODE_STRING SuffixString;
|
||||
UNICODE_STRING SymlinkName;
|
||||
PDEVICE_EXTENSION DeviceExtension;
|
||||
ULONG Suffix;
|
||||
NTSTATUS Status;
|
||||
@@ -541,28 +538,16 @@ AllocatePointerDevice(PDRIVER_OBJECT DriverObject)
|
||||
}
|
||||
|
||||
ExFreePool(DeviceName.Buffer);
|
||||
ExFreePool(SuffixString.Buffer);
|
||||
|
||||
/* Couldn't create device */
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ExFreePool(SuffixString.Buffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
DeviceObject->Flags = DeviceObject->Flags | DO_BUFFERED_IO;
|
||||
|
||||
#ifdef SERMOUSE_MOUSESYMLINK_SUPPORT
|
||||
/* Create symlink */
|
||||
/* FIXME: Why? FiN 20/08/2003 */
|
||||
RtlInitUnicodeString(&SymlinkName, NULL);
|
||||
SymlinkName.MaximumLength = sizeof(L"\\??\\Mouse") + SUFFIX_MAXIMUM_SIZE + sizeof(UNICODE_NULL);
|
||||
SymlinkName.Buffer = ExAllocatePool(PagedPool, SymlinkName.MaximumLength);
|
||||
RtlAppendUnicodeToString(&SymlinkName, L"\\??\\Mouse");
|
||||
RtlAppendUnicodeToString(&DeviceName, SuffixString.Buffer);
|
||||
IoCreateSymbolicLink(&SymlinkName, &DeviceName);
|
||||
#endif
|
||||
ExFreePool(SuffixString.Buffer);
|
||||
|
||||
DeviceExtension = DeviceObject->DeviceExtension;
|
||||
KeInitializeDpc(&DeviceExtension->IsrDpc, (PKDEFERRED_ROUTINE)SerialMouseIsrDpc, DeviceObject);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user