mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 00:31:27 +00:00
[SERIAL]
- Update the I/O manager's global configuration table with the correct number of serial ports svn path=/trunk/; revision=53005
This commit is contained in:
parent
e4b89070d6
commit
85b2720526
1 changed files with 3 additions and 5 deletions
|
@ -24,8 +24,6 @@ SerialAddDeviceInternal(
|
|||
NTSTATUS Status;
|
||||
WCHAR DeviceNameBuffer[32];
|
||||
UNICODE_STRING DeviceName;
|
||||
static ULONG DeviceNumber = 0;
|
||||
static ULONG ComPortNumber = 1;
|
||||
|
||||
TRACE_(SERIAL, "SerialAddDeviceInternal()\n");
|
||||
|
||||
|
@ -33,7 +31,7 @@ SerialAddDeviceInternal(
|
|||
ASSERT(Pdo);
|
||||
|
||||
/* Create new device object */
|
||||
swprintf(DeviceNameBuffer, L"\\Device\\Serial%lu", DeviceNumber);
|
||||
swprintf(DeviceNameBuffer, L"\\Device\\Serial%lu", IoGetConfigurationInformation()->SerialCount);
|
||||
RtlInitUnicodeString(&DeviceName, DeviceNameBuffer);
|
||||
Status = IoCreateDevice(DriverObject,
|
||||
sizeof(SERIAL_DEVICE_EXTENSION),
|
||||
|
@ -59,9 +57,9 @@ SerialAddDeviceInternal(
|
|||
goto ByeBye;
|
||||
}
|
||||
|
||||
DeviceExtension->SerialPortNumber = DeviceNumber++;
|
||||
DeviceExtension->SerialPortNumber = IoGetConfigurationInformation()->SerialCount++;
|
||||
if (pComPortNumber == NULL)
|
||||
DeviceExtension->ComPort = ComPortNumber++;
|
||||
DeviceExtension->ComPort = DeviceExtension->SerialPortNumber + 1;
|
||||
else
|
||||
DeviceExtension->ComPort = *pComPortNumber;
|
||||
DeviceExtension->Pdo = Pdo;
|
||||
|
|
Loading…
Reference in a new issue