Hervé Poussineau <poussine(a)freesurf.fr>
No need to create \??\Mouse symlink in mouse driver, it's done in
mouclass.
Modified: trunk/reactos/drivers/input/psaux/psaux.c
Modified: trunk/reactos/drivers/input/sermouse/sermouse.c
_____
Modified: trunk/reactos/drivers/input/psaux/psaux.c
--- trunk/reactos/drivers/input/psaux/psaux.c 2005-01-26 22:03:05 UTC
(rev 13322)
+++ trunk/reactos/drivers/input/psaux/psaux.c 2005-01-26 22:05:12 UTC
(rev 13323)
@@ -177,7 +177,6 @@
PDEVICE_OBJECT DeviceObject;
UNICODE_STRING DeviceName;
UNICODE_STRING SuffixString;
- UNICODE_STRING SymlinkName;
PDEVICE_EXTENSION DeviceExtension;
ULONG Suffix;
NTSTATUS Status;
@@ -213,25 +212,16 @@
}
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);
_____
Modified: trunk/reactos/drivers/input/sermouse/sermouse.c
--- trunk/reactos/drivers/input/sermouse/sermouse.c 2005-01-26
22:03:05 UTC (rev 13322)
+++ trunk/reactos/drivers/input/sermouse/sermouse.c 2005-01-26
22:05:12 UTC (rev 13323)
@@ -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 @@
PDEVICE_OBJECT DeviceObject;
UNICODE_STRING DeviceName;
UNICODE_STRING SuffixString;
- UNICODE_STRING SymlinkName;
PDEVICE_EXTENSION DeviceExtension;
ULONG Suffix;
NTSTATUS Status;
@@ -541,28 +538,16 @@
}
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);
Show replies by date