ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2020
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
156 discussions
Start a n
N
ew thread
[reactos] 08/10: [ISAPNP] Detect devices only once ReadDataPort is started
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5b9929a07687d202ec3f8…
commit 5b9929a07687d202ec3f8240af8579f7fc51538a Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 16 20:58:53 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Detect devices only once ReadDataPort is started Also let kernel choose the read data port address, by using the resources given in IRP_MN_START_DEVICE. --- drivers/bus/isapnp/fdo.c | 24 ---------------------- drivers/bus/isapnp/hardware.c | 37 +++------------------------------ drivers/bus/isapnp/isapnp.h | 4 ++-- drivers/bus/isapnp/pdo.c | 48 ++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 52 insertions(+), 61 deletions(-) diff --git a/drivers/bus/isapnp/fdo.c b/drivers/bus/isapnp/fdo.c index f232766b180..caa4b69c7e2 100644 --- a/drivers/bus/isapnp/fdo.c +++ b/drivers/bus/isapnp/fdo.c @@ -17,21 +17,9 @@ IsaFdoStartDevice( IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp) { - NTSTATUS Status; - KIRQL OldIrql; - UNREFERENCED_PARAMETER(Irp); UNREFERENCED_PARAMETER(IrpSp); - KeAcquireSpinLock(&FdoExt->Lock, &OldIrql); - Status = IsaHwDetectReadDataPort(FdoExt); - KeReleaseSpinLock(&FdoExt->Lock, OldIrql); - - if (!NT_SUCCESS(Status)) - { - return Status; - } - FdoExt->Common.State = dsStarted; return STATUS_SUCCESS; @@ -44,21 +32,9 @@ IsaFdoQueryDeviceRelations( IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp) { - NTSTATUS Status; - KIRQL OldIrql; - if (IrpSp->Parameters.QueryDeviceRelations.Type != BusRelations) return Irp->IoStatus.Status; - KeAcquireSpinLock(&FdoExt->Lock, &OldIrql); - Status = IsaHwFillDeviceList(FdoExt); - KeReleaseSpinLock(&FdoExt->Lock, OldIrql); - - if (!NT_SUCCESS(Status)) - { - return Status; - } - return IsaPnpFillDeviceRelations(FdoExt, Irp, TRUE); } diff --git a/drivers/bus/isapnp/hardware.c b/drivers/bus/isapnp/hardware.c index 77ca6c40b4b..4a3d49bb1e7 100644 --- a/drivers/bus/isapnp/hardware.c +++ b/drivers/bus/isapnp/hardware.c @@ -451,28 +451,6 @@ TryIsolate( return Csn; } -static -PUCHAR -Isolate(VOID) -{ - PUCHAR ReadPort; - - for (ReadPort = (PUCHAR)ISAPNP_READ_PORT_START; - (ULONG_PTR)ReadPort <= ISAPNP_READ_PORT_MAX; - ReadPort += ISAPNP_READ_PORT_STEP) - { - /* Avoid the NE2000 probe space */ - if ((ULONG_PTR)ReadPort >= 0x280 && - (ULONG_PTR)ReadPort <= 0x380) - continue; - - if (TryIsolate(ReadPort) > 0) - return ReadPort; - } - - return 0; -} - VOID DeviceActivation( IN PISAPNP_LOGICAL_DEVICE IsaDevice, @@ -557,19 +535,10 @@ ProbeIsaPnpBus( NTSTATUS NTAPI -IsaHwDetectReadDataPort( - IN PISAPNP_FDO_EXTENSION FdoExt) +IsaHwTryReadDataPort( + IN PUCHAR ReadDataPort) { - FdoExt->ReadDataPort = Isolate(); - if (!FdoExt->ReadDataPort) - { - DPRINT1("No read data port found\n"); - return STATUS_INSUFFICIENT_RESOURCES; - } - - DPRINT1("Detected read data port at 0x%p\n", FdoExt->ReadDataPort); - - return STATUS_SUCCESS; + return TryIsolate(ReadDataPort) > 0 ? STATUS_SUCCESS : STATUS_INSUFFICIENT_RESOURCES; } NTSTATUS diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h index e62381b6760..4a68b5ee11d 100644 --- a/drivers/bus/isapnp/isapnp.h +++ b/drivers/bus/isapnp/isapnp.h @@ -106,8 +106,8 @@ IsaPdoPnp( /* hardware.c */ NTSTATUS NTAPI -IsaHwDetectReadDataPort( - IN PISAPNP_FDO_EXTENSION FdoExt); +IsaHwTryReadDataPort( + IN PUCHAR ReadDataPort); NTSTATUS NTAPI diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c index 55ab0da804a..f0481119758 100644 --- a/drivers/bus/isapnp/pdo.c +++ b/drivers/bus/isapnp/pdo.c @@ -213,6 +213,52 @@ IsaPdoQueryResourceRequirements( return STATUS_SUCCESS; } +static +NTSTATUS +NTAPI +IsaPdoStartReadPort( + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIO_STACK_LOCATION IrpSp) +{ + PCM_RESOURCE_LIST ResourceList = IrpSp->Parameters.StartDevice.AllocatedResources; + NTSTATUS Status; + KIRQL OldIrql; + ULONG i; + + if (!ResourceList || ResourceList->Count != 1) + { + DPRINT1("No resource list (%p) or bad count (%d)\n", ResourceList, ResourceList ? ResourceList->Count : 0); + return STATUS_INSUFFICIENT_RESOURCES; + } + if (ResourceList->List[0].PartialResourceList.Version != 1 + || ResourceList->List[0].PartialResourceList.Revision != 1) + { + DPRINT1("Bad resource list version (%d.%d)\n", ResourceList->List[0].PartialResourceList.Version, ResourceList->List[0].PartialResourceList.Revision); + return STATUS_REVISION_MISMATCH; + } + for (i = 0; i < ResourceList->List[0].PartialResourceList.Count; i++) + { + PCM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptor = &ResourceList->List[0].PartialResourceList.PartialDescriptors[i]; + if (PartialDescriptor->Type == CmResourceTypePort) + { + PUCHAR ReadDataPort = (PUCHAR)PartialDescriptor->u.Port.Start.u.LowPart + 3; + if (PartialDescriptor->u.Port.Length > 1 && !FdoExt->ReadDataPort && NT_SUCCESS(IsaHwTryReadDataPort(ReadDataPort))) + { + FdoExt->ReadDataPort = ReadDataPort; + KeAcquireSpinLock(&FdoExt->Lock, &OldIrql); + Status = IsaHwFillDeviceList(FdoExt); + KeReleaseSpinLock(&FdoExt->Lock, OldIrql); + if (FdoExt->DeviceCount > 0) + { + IoInvalidateDeviceRelations(FdoExt->Pdo, BusRelations); + IoInvalidateDeviceRelations(FdoExt->DataPortPdo, RemovalRelations); + } + } + } + } + return Status; +} + NTSTATUS NTAPI IsaPdoPnp( @@ -228,7 +274,7 @@ IsaPdoPnp( if (PdoExt->IsaPnpDevice) Status = IsaHwActivateDevice(PdoExt->IsaPnpDevice); else - Status = STATUS_SUCCESS; + Status = IsaPdoStartReadPort(PdoExt->FdoExt, IrpSp); if (NT_SUCCESS(Status)) PdoExt->Common.State = dsStarted;
4 years, 9 months
1
0
0
0
[reactos] 07/10: [ISAPNP] Implement IRP_MN_QUERY_RESOURCES/IRP_MN_QUERY_RESOURCE_REQUIREMENTS for ReadDataPort
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5a404e6c5048a29a4e6c3…
commit 5a404e6c5048a29a4e6c3dc2d1bf2df776cf0d44 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 16 20:50:29 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Implement IRP_MN_QUERY_RESOURCES/IRP_MN_QUERY_RESOURCE_REQUIREMENTS for ReadDataPort --- drivers/bus/isapnp/pdo.c | 183 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 140 insertions(+), 43 deletions(-) diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c index 639f07d5aa1..55ab0da804a 100644 --- a/drivers/bus/isapnp/pdo.c +++ b/drivers/bus/isapnp/pdo.c @@ -6,6 +6,7 @@ */ #include <isapnp.h> +#include <isapnphw.h> #define NDEBUG #include <debug.h> @@ -122,6 +123,96 @@ IsaPdoQueryId( return STATUS_SUCCESS; } +NTSTATUS +NTAPI +IsaPdoQueryResources( + IN PISAPNP_PDO_EXTENSION PdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) +{ + USHORT Ports[] = { ISAPNP_WRITE_DATA, ISAPNP_ADDRESS }; + ULONG ListSize, i; + PCM_RESOURCE_LIST ResourceList; + PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor; + + ListSize = sizeof(CM_RESOURCE_LIST) + + (ARRAYSIZE(Ports) - 1) * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); + ResourceList = ExAllocatePool(NonPagedPool, ListSize); + if (!ResourceList) + return STATUS_NO_MEMORY; + + RtlZeroMemory(ResourceList, ListSize); + ResourceList->Count = 1; + ResourceList->List[0].InterfaceType = Internal; + ResourceList->List[0].PartialResourceList.Version = 1; + ResourceList->List[0].PartialResourceList.Revision = 1; + ResourceList->List[0].PartialResourceList.Count = 2; + + for (i = 0; i < ARRAYSIZE(Ports); i++) + { + Descriptor = &ResourceList->List[0].PartialResourceList.PartialDescriptors[i]; + Descriptor->Type = CmResourceTypePort; + Descriptor->ShareDisposition = CmResourceShareDeviceExclusive; + Descriptor->Flags = CM_RESOURCE_PORT_16_BIT_DECODE; + Descriptor->u.Port.Length = 0x01; + Descriptor->u.Port.Start.LowPart = Ports[i]; + } + + Irp->IoStatus.Information = (ULONG_PTR)ResourceList; + return STATUS_SUCCESS; +} + +NTSTATUS +NTAPI +IsaPdoQueryResourceRequirements( + IN PISAPNP_PDO_EXTENSION PdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) +{ + USHORT Ports[] = { ISAPNP_WRITE_DATA, ISAPNP_ADDRESS, 0x274, 0x3e4, 0x204, 0x2e4, 0x354, 0x2f4 }; + ULONG ListSize, i; + PIO_RESOURCE_REQUIREMENTS_LIST RequirementsList; + PIO_RESOURCE_DESCRIPTOR Descriptor; + + ListSize = sizeof(IO_RESOURCE_REQUIREMENTS_LIST) + + 2 * ARRAYSIZE(Ports) * sizeof(IO_RESOURCE_DESCRIPTOR); + RequirementsList = ExAllocatePool(NonPagedPool, ListSize); + if (!RequirementsList) + return STATUS_NO_MEMORY; + + RtlZeroMemory(RequirementsList, ListSize); + RequirementsList->ListSize = ListSize; + RequirementsList->AlternativeLists = 1; + + RequirementsList->List[0].Version = 1; + RequirementsList->List[0].Revision = 1; + RequirementsList->List[0].Count = 2 * ARRAYSIZE(Ports); + + for (i = 0; i < 2 * ARRAYSIZE(Ports); i += 2) + { + Descriptor = &RequirementsList->List[0].Descriptors[i]; + + /* Expected port */ + Descriptor[0].Type = CmResourceTypePort; + Descriptor[0].ShareDisposition = CmResourceShareDeviceExclusive; + Descriptor[0].Flags = CM_RESOURCE_PORT_16_BIT_DECODE; + Descriptor[0].u.Port.Length = Ports[i / 2] & 1 ? 0x01 : 0x04; + Descriptor[0].u.Port.Alignment = 0x01; + Descriptor[0].u.Port.MinimumAddress.LowPart = Ports[i / 2]; + Descriptor[0].u.Port.MaximumAddress.LowPart = Ports[i / 2] + Descriptor[0].u.Port.Length - 1; + + /* ... but mark it as optional */ + Descriptor[1].Option = IO_RESOURCE_ALTERNATIVE; + Descriptor[1].Type = CmResourceTypePort; + Descriptor[1].ShareDisposition = CmResourceShareDeviceExclusive; + Descriptor[1].Flags = CM_RESOURCE_PORT_16_BIT_DECODE; + Descriptor[1].u.Port.Alignment = 0x01; + } + + Irp->IoStatus.Information = (ULONG_PTR)RequirementsList; + return STATUS_SUCCESS; +} + NTSTATUS NTAPI IsaPdoPnp( @@ -133,49 +224,55 @@ IsaPdoPnp( switch (IrpSp->MinorFunction) { - case IRP_MN_START_DEVICE: - if (PdoExt->IsaPnpDevice) - Status = IsaHwActivateDevice(PdoExt->IsaPnpDevice); - else - Status = STATUS_SUCCESS; - - if (NT_SUCCESS(Status)) - PdoExt->Common.State = dsStarted; - break; - - case IRP_MN_STOP_DEVICE: - if (PdoExt->IsaPnpDevice) - Status = IsaHwDeactivateDevice(PdoExt->IsaPnpDevice); - else - Status = STATUS_SUCCESS; - - if (NT_SUCCESS(Status)) - PdoExt->Common.State = dsStopped; - break; - - case IRP_MN_QUERY_DEVICE_RELATIONS: - Status = IsaPdoQueryDeviceRelations(PdoExt, Irp, IrpSp); - break; - - case IRP_MN_QUERY_CAPABILITIES: - Status = IsaPdoQueryCapabilities(PdoExt, Irp, IrpSp); - break; - - case IRP_MN_QUERY_RESOURCES: - DPRINT1("IRP_MN_QUERY_RESOURCES is UNIMPLEMENTED!\n"); - break; - - case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: - DPRINT1("IRP_MN_QUERY_RESOURCE_REQUIREMENTS is UNIMPLEMENTED!\n"); - break; - - case IRP_MN_QUERY_ID: - Status = IsaPdoQueryId(PdoExt, Irp, IrpSp); - break; - - default: - DPRINT1("Unknown PnP code: %x\n", IrpSp->MinorFunction); - break; + case IRP_MN_START_DEVICE: + if (PdoExt->IsaPnpDevice) + Status = IsaHwActivateDevice(PdoExt->IsaPnpDevice); + else + Status = STATUS_SUCCESS; + + if (NT_SUCCESS(Status)) + PdoExt->Common.State = dsStarted; + break; + + case IRP_MN_STOP_DEVICE: + if (PdoExt->IsaPnpDevice) + Status = IsaHwDeactivateDevice(PdoExt->IsaPnpDevice); + else + Status = STATUS_SUCCESS; + + if (NT_SUCCESS(Status)) + PdoExt->Common.State = dsStopped; + break; + + case IRP_MN_QUERY_DEVICE_RELATIONS: + Status = IsaPdoQueryDeviceRelations(PdoExt, Irp, IrpSp); + break; + + case IRP_MN_QUERY_CAPABILITIES: + Status = IsaPdoQueryCapabilities(PdoExt, Irp, IrpSp); + break; + + case IRP_MN_QUERY_RESOURCES: + if (PdoExt->Common.Self == PdoExt->FdoExt->DataPortPdo) + Status = IsaPdoQueryResources(PdoExt, Irp, IrpSp); + else + DPRINT1("IRP_MN_QUERY_RESOURCES is UNIMPLEMENTED!\n"); + break; + + case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: + if (PdoExt->Common.Self == PdoExt->FdoExt->DataPortPdo) + Status = IsaPdoQueryResourceRequirements(PdoExt, Irp, IrpSp); + else + DPRINT1("IRP_MN_QUERY_RESOURCE_REQUIREMENTS is UNIMPLEMENTED!\n"); + break; + + case IRP_MN_QUERY_ID: + Status = IsaPdoQueryId(PdoExt, Irp, IrpSp); + break; + + default: + DPRINT1("Unknown PnP code: %x\n", IrpSp->MinorFunction); + break; } Irp->IoStatus.Status = Status;
4 years, 9 months
1
0
0
0
[reactos] 06/10: [ISAPNP] Report removal relations on ReadDataPort
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2fe644dc860767ec38035…
commit 2fe644dc860767ec38035f730b11fadf902a8646 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 16 19:43:37 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Report removal relations on ReadDataPort --- drivers/bus/isapnp/isapnp.c | 2 ++ drivers/bus/isapnp/isapnp.h | 1 + drivers/bus/isapnp/pdo.c | 6 ++++++ 3 files changed, 9 insertions(+) diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c index 41488efc5a7..7f2731b7ce4 100644 --- a/drivers/bus/isapnp/isapnp.c +++ b/drivers/bus/isapnp/isapnp.c @@ -194,6 +194,7 @@ IsaPnpFillDeviceRelations( PdoExt->Common.Self = IsaDevice->Pdo; PdoExt->Common.State = dsStopped; PdoExt->IsaPnpDevice = IsaDevice; + PdoExt->FdoExt = FdoExt; Status = IsaFdoCreateDeviceIDs(PdoExt); if (!NT_SUCCESS(Status)) @@ -352,6 +353,7 @@ IsaPnpCreateReadPortDO(PISAPNP_FDO_EXTENSION FdoExt) PdoExt->Common.IsFdo = FALSE; PdoExt->Common.Self = FdoExt->DataPortPdo; PdoExt->Common.State = dsStopped; + PdoExt->FdoExt = FdoExt; Status = IsaPnpDuplicateUnicodeString(0, &DeviceID, diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h index 724ccfea79d..e62381b6760 100644 --- a/drivers/bus/isapnp/isapnp.h +++ b/drivers/bus/isapnp/isapnp.h @@ -48,6 +48,7 @@ typedef struct _ISAPNP_FDO_EXTENSION { typedef struct _ISAPNP_PDO_EXTENSION { ISAPNP_COMMON_EXTENSION Common; PISAPNP_LOGICAL_DEVICE IsaPnpDevice; + PISAPNP_FDO_EXTENSION FdoExt; UNICODE_STRING DeviceID; UNICODE_STRING HardwareIDs; UNICODE_STRING InstanceID; diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c index 1f3f7e18f7b..639f07d5aa1 100644 --- a/drivers/bus/isapnp/pdo.c +++ b/drivers/bus/isapnp/pdo.c @@ -19,6 +19,12 @@ IsaPdoQueryDeviceRelations( { PDEVICE_RELATIONS DeviceRelations; + if (IrpSp->Parameters.QueryDeviceRelations.Type == RemovalRelations && + PdoExt->Common.Self == PdoExt->FdoExt->DataPortPdo) + { + return IsaPnpFillDeviceRelations(PdoExt->FdoExt, Irp, FALSE); + } + if (IrpSp->Parameters.QueryDeviceRelations.Type != TargetDeviceRelation) return Irp->IoStatus.Status;
4 years, 9 months
1
0
0
0
[reactos] 05/10: [ISAPNP] Report a ReadDataPort PDO
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c4813f73f56d21ccc9926…
commit c4813f73f56d21ccc9926ff2f93980aea040b141 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 16 19:24:07 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Report a ReadDataPort PDO This PDO will later request resources required for ISAPNP bus. --- drivers/bus/isapnp/fdo.c | 2 +- drivers/bus/isapnp/isapnp.c | 61 ++++++++++++++++++++++++++++++++++++++++++++- drivers/bus/isapnp/isapnp.h | 4 ++- drivers/bus/isapnp/pdo.c | 27 +++++++++++++++++--- 4 files changed, 87 insertions(+), 7 deletions(-) diff --git a/drivers/bus/isapnp/fdo.c b/drivers/bus/isapnp/fdo.c index 6417d6e68bc..f232766b180 100644 --- a/drivers/bus/isapnp/fdo.c +++ b/drivers/bus/isapnp/fdo.c @@ -59,7 +59,7 @@ IsaFdoQueryDeviceRelations( return Status; } - return IsaPnpFillDeviceRelations(FdoExt, Irp); + return IsaPnpFillDeviceRelations(FdoExt, Irp, TRUE); } NTSTATUS diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c index 0382f8c843d..41488efc5a7 100644 --- a/drivers/bus/isapnp/isapnp.c +++ b/drivers/bus/isapnp/isapnp.c @@ -140,7 +140,8 @@ NTSTATUS NTAPI IsaPnpFillDeviceRelations( IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp) + IN PIRP Irp, + IN BOOLEAN IncludeDataPort) { PISAPNP_PDO_EXTENSION PdoExt; NTSTATUS Status = STATUS_SUCCESS; @@ -156,6 +157,12 @@ IsaPnpFillDeviceRelations( return STATUS_NO_MEMORY; } + if (IncludeDataPort) + { + DeviceRelations->Objects[i++] = FdoExt->DataPortPdo; + ObReferenceObject(FdoExt->DataPortPdo); + } + CurrentEntry = FdoExt->DeviceListHead.Flink; while (CurrentEntry != &FdoExt->DeviceListHead) { @@ -320,6 +327,53 @@ IsaReadWrite( return STATUS_NOT_SUPPORTED; } +static +NTSTATUS +NTAPI +IsaPnpCreateReadPortDO(PISAPNP_FDO_EXTENSION FdoExt) +{ + UNICODE_STRING DeviceID = RTL_CONSTANT_STRING(L"ISAPNP\\ReadDataPort\0"); + UNICODE_STRING HardwareIDs = RTL_CONSTANT_STRING(L"ISAPNP\\ReadDataPort\0\0"); + UNICODE_STRING InstanceID = RTL_CONSTANT_STRING(L"0\0"); + PISAPNP_PDO_EXTENSION PdoExt; + + NTSTATUS Status; + Status = IoCreateDevice(FdoExt->DriverObject, + sizeof(ISAPNP_PDO_EXTENSION), + NULL, + FILE_DEVICE_CONTROLLER, + FILE_DEVICE_SECURE_OPEN, + FALSE, + &FdoExt->DataPortPdo); + if (!NT_SUCCESS(Status)) + return Status; + PdoExt = (PISAPNP_PDO_EXTENSION)FdoExt->DataPortPdo->DeviceExtension; + RtlZeroMemory(PdoExt, sizeof(ISAPNP_PDO_EXTENSION)); + PdoExt->Common.IsFdo = FALSE; + PdoExt->Common.Self = FdoExt->DataPortPdo; + PdoExt->Common.State = dsStopped; + + Status = IsaPnpDuplicateUnicodeString(0, + &DeviceID, + &PdoExt->DeviceID); + if (!NT_SUCCESS(Status)) + return Status; + + Status = IsaPnpDuplicateUnicodeString(0, + &HardwareIDs, + &PdoExt->HardwareIDs); + if (!NT_SUCCESS(Status)) + return Status; + + Status = IsaPnpDuplicateUnicodeString(0, + &InstanceID, + &PdoExt->InstanceID); + if (!NT_SUCCESS(Status)) + return Status; + + return Status; +} + static NTSTATUS NTAPI @@ -360,7 +414,12 @@ IsaAddDevice( InitializeListHead(&FdoExt->DeviceListHead); KeInitializeSpinLock(&FdoExt->Lock); + Status = IsaPnpCreateReadPortDO(FdoExt); + if (!NT_SUCCESS(Status)) + return Status; + Fdo->Flags &= ~DO_DEVICE_INITIALIZING; + FdoExt->DataPortPdo->Flags &= ~DO_DEVICE_INITIALIZING; return STATUS_SUCCESS; } diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h index 3321ff8b9ec..724ccfea79d 100644 --- a/drivers/bus/isapnp/isapnp.h +++ b/drivers/bus/isapnp/isapnp.h @@ -37,6 +37,7 @@ typedef struct _ISAPNP_FDO_EXTENSION { ISAPNP_COMMON_EXTENSION Common; PDEVICE_OBJECT Ldo; PDEVICE_OBJECT Pdo; + PDEVICE_OBJECT DataPortPdo; LIST_ENTRY DeviceListHead; ULONG DeviceCount; PDRIVER_OBJECT DriverObject; @@ -68,7 +69,8 @@ NTSTATUS NTAPI IsaPnpFillDeviceRelations( IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp); + IN PIRP Irp, + IN BOOLEAN IncludeDataPort); DRIVER_INITIALIZE DriverEntry; diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c index 78026a3b40a..1f3f7e18f7b 100644 --- a/drivers/bus/isapnp/pdo.c +++ b/drivers/bus/isapnp/pdo.c @@ -44,13 +44,26 @@ IsaPdoQueryCapabilities( { PDEVICE_CAPABILITIES DeviceCapabilities; PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice; + ULONG i; DeviceCapabilities = IrpSp->Parameters.DeviceCapabilities.Capabilities; if (DeviceCapabilities->Version != 1) return STATUS_REVISION_MISMATCH; - DeviceCapabilities->UniqueID = LogDev->SerialNumber != 0xffffffff; - DeviceCapabilities->Address = LogDev->CSN; + if (LogDev) + { + DeviceCapabilities->UniqueID = LogDev->SerialNumber != 0xffffffff; + DeviceCapabilities->Address = LogDev->CSN; + } + else + { + DeviceCapabilities->UniqueID = TRUE; + DeviceCapabilities->SilentInstall = TRUE; + DeviceCapabilities->RawDeviceOK = TRUE; + for (i = 0; i < POWER_SYSTEM_MAXIMUM; i++) + DeviceCapabilities->DeviceState[i] = PowerDeviceD3; + DeviceCapabilities->DeviceState[PowerSystemWorking] = PowerDeviceD0; + } return STATUS_SUCCESS; } @@ -115,14 +128,20 @@ IsaPdoPnp( switch (IrpSp->MinorFunction) { case IRP_MN_START_DEVICE: - Status = IsaHwActivateDevice(PdoExt->IsaPnpDevice); + if (PdoExt->IsaPnpDevice) + Status = IsaHwActivateDevice(PdoExt->IsaPnpDevice); + else + Status = STATUS_SUCCESS; if (NT_SUCCESS(Status)) PdoExt->Common.State = dsStarted; break; case IRP_MN_STOP_DEVICE: - Status = IsaHwDeactivateDevice(PdoExt->IsaPnpDevice); + if (PdoExt->IsaPnpDevice) + Status = IsaHwDeactivateDevice(PdoExt->IsaPnpDevice); + else + Status = STATUS_SUCCESS; if (NT_SUCCESS(Status)) PdoExt->Common.State = dsStopped;
4 years, 9 months
1
0
0
0
[reactos] 04/10: [ISAPNP] Create PDO identifiers ahead of IRP_MN_QUERY_ID
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e0607fcebf0f93ed2b5be…
commit e0607fcebf0f93ed2b5be062771ca2300cc73196 Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 16 19:00:00 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Create PDO identifiers ahead of IRP_MN_QUERY_ID --- drivers/bus/isapnp/isapnp.c | 134 ++++++++++++++++++++++++++++++++++++++++++++ drivers/bus/isapnp/isapnp.h | 13 +++++ drivers/bus/isapnp/pdo.c | 68 ++++++---------------- 3 files changed, 163 insertions(+), 52 deletions(-) diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c index 6fc29e9e70c..0382f8c843d 100644 --- a/drivers/bus/isapnp/isapnp.c +++ b/drivers/bus/isapnp/isapnp.c @@ -10,6 +10,132 @@ #define NDEBUG #include <debug.h> +NTSTATUS +NTAPI +IsaPnpDuplicateUnicodeString( + IN ULONG Flags, + IN PCUNICODE_STRING SourceString, + OUT PUNICODE_STRING DestinationString) +{ + if (SourceString == NULL || + DestinationString == NULL || + SourceString->Length > SourceString->MaximumLength || + (SourceString->Length == 0 && SourceString->MaximumLength > 0 && SourceString->Buffer == NULL) || + Flags == RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING || + Flags >= 4) + { + return STATUS_INVALID_PARAMETER; + } + + if ((SourceString->Length == 0) && + (Flags != (RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE | + RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING))) + { + DestinationString->Length = 0; + DestinationString->MaximumLength = 0; + DestinationString->Buffer = NULL; + } + else + { + USHORT DestMaxLength = SourceString->Length; + + if (Flags & RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE) + DestMaxLength += sizeof(UNICODE_NULL); + + DestinationString->Buffer = ExAllocatePool(PagedPool, DestMaxLength); + if (DestinationString->Buffer == NULL) + return STATUS_NO_MEMORY; + + RtlCopyMemory(DestinationString->Buffer, SourceString->Buffer, SourceString->Length); + DestinationString->Length = SourceString->Length; + DestinationString->MaximumLength = DestMaxLength; + + if (Flags & RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE) + DestinationString->Buffer[DestinationString->Length / sizeof(WCHAR)] = 0; + } + + return STATUS_SUCCESS; +} + +static +NTSTATUS +NTAPI +IsaFdoCreateDeviceIDs( + IN PISAPNP_PDO_EXTENSION PdoExt) +{ + PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice; + UNICODE_STRING TempString; + WCHAR TempBuffer[256]; + PWCHAR End; + NTSTATUS Status; + USHORT i; + + TempString.Buffer = TempBuffer; + TempString.MaximumLength = sizeof(TempBuffer); + TempString.Length = 0; + + /* Device ID */ + Status = RtlStringCbPrintfExW(TempString.Buffer, + TempString.MaximumLength / sizeof(WCHAR), + &End, + NULL, 0, + L"ISAPNP\\%3S%04X", + LogDev->VendorId, + LogDev->ProdId); + if (!NT_SUCCESS(Status)) + return Status; + TempString.Length = (End - TempString.Buffer) * sizeof(WCHAR); + Status = IsaPnpDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, + &TempString, + &PdoExt->DeviceID); + if (!NT_SUCCESS(Status)) + return Status; + + /* HardwareIDs */ + Status = RtlStringCbPrintfExW(TempString.Buffer, + TempString.MaximumLength / sizeof(WCHAR), + &End, + NULL, 0, + L"ISAPNP\\%3S%04X@" + L"*%3S%04X@", + LogDev->VendorId, + LogDev->ProdId, + LogDev->VendorId, + LogDev->ProdId); + if (!NT_SUCCESS(Status)) + return Status; + TempString.Length = (End - TempString.Buffer) * sizeof(WCHAR); + Status = IsaPnpDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, + &TempString, + &PdoExt->HardwareIDs); + if (!NT_SUCCESS(Status)) + return Status; + for (i = 0; i < PdoExt->HardwareIDs.Length / sizeof(WCHAR); i++) + if (PdoExt->HardwareIDs.Buffer[i] == '@') + PdoExt->HardwareIDs.Buffer[i] = UNICODE_NULL; + + /* InstanceID */ + Status = RtlStringCbPrintfExW(TempString.Buffer, + TempString.MaximumLength / sizeof(WCHAR), + &End, + NULL, 0, + L"%X", + LogDev->SerialNumber); + if (!NT_SUCCESS(Status)) + return Status; + TempString.Length = (End - TempString.Buffer) * sizeof(WCHAR); + Status = IsaPnpDuplicateUnicodeString( + RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, + &TempString, + &PdoExt->InstanceID); + if (!NT_SUCCESS(Status)) + return Status; + + return STATUS_SUCCESS; +} + NTSTATUS NTAPI IsaPnpFillDeviceRelations( @@ -61,6 +187,14 @@ IsaPnpFillDeviceRelations( PdoExt->Common.Self = IsaDevice->Pdo; PdoExt->Common.State = dsStopped; PdoExt->IsaPnpDevice = IsaDevice; + + Status = IsaFdoCreateDeviceIDs(PdoExt); + if (!NT_SUCCESS(Status)) + { + IoDeleteDevice(IsaDevice->Pdo); + IsaDevice->Pdo = NULL; + break; + } } DeviceRelations->Objects[i++] = IsaDevice->Pdo; diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h index e247643112c..3321ff8b9ec 100644 --- a/drivers/bus/isapnp/isapnp.h +++ b/drivers/bus/isapnp/isapnp.h @@ -47,10 +47,23 @@ typedef struct _ISAPNP_FDO_EXTENSION { typedef struct _ISAPNP_PDO_EXTENSION { ISAPNP_COMMON_EXTENSION Common; PISAPNP_LOGICAL_DEVICE IsaPnpDevice; + UNICODE_STRING DeviceID; + UNICODE_STRING HardwareIDs; + UNICODE_STRING InstanceID; } ISAPNP_PDO_EXTENSION, *PISAPNP_PDO_EXTENSION; /* isapnp.c */ +#define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE 1 +#define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING 2 + +NTSTATUS +NTAPI +IsaPnpDuplicateUnicodeString( + IN ULONG Flags, + IN PCUNICODE_STRING SourceString, + OUT PUNICODE_STRING DestinationString); + NTSTATUS NTAPI IsaPnpFillDeviceRelations( diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c index 4a674a05e0f..78026a3b40a 100644 --- a/drivers/bus/isapnp/pdo.c +++ b/drivers/bus/isapnp/pdo.c @@ -62,79 +62,43 @@ IsaPdoQueryId( IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp) { - PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice; - WCHAR Temp[256]; - PWCHAR Buffer, End; - ULONG Length; - NTSTATUS Status; + UNICODE_STRING EmptyString = RTL_CONSTANT_STRING(L""); + PUNICODE_STRING Source; + PWCHAR Buffer; switch (IrpSp->Parameters.QueryId.IdType) { case BusQueryDeviceID: - { DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n"); - Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), - &End, - NULL, 0, - L"ISAPNP\\%3S%04X", - LogDev->VendorId, - LogDev->ProdId); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; + Source = &PdoExt->DeviceID; break; - } case BusQueryHardwareIDs: DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); - Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), - &End, - NULL, 0, - L"ISAPNP\\%3S%04X", - LogDev->VendorId, - LogDev->ProdId); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; - Status = RtlStringCbPrintfExW(Temp + Length, sizeof(Temp) - Length, - &End, - NULL, 0, - L"*%3S%04X", - LogDev->VendorId, - LogDev->ProdId); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; - Temp[Length++] = UNICODE_NULL; + Source = &PdoExt->HardwareIDs; + break; + + case BusQueryCompatibleIDs: + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryCompatibleIDs\n"); + Source = &EmptyString; break; case BusQueryInstanceID: DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); - Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), - &End, - NULL, 0, - L"%X", - LogDev->SerialNumber); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; + Source = &PdoExt->InstanceID; break; default: - DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", - IrpSp->Parameters.QueryId.IdType); - return Irp->IoStatus.Status; + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", + IrpSp->Parameters.QueryId.IdType); + return Irp->IoStatus.Status; } - Buffer = ExAllocatePool(PagedPool, Length * sizeof(WCHAR)); + Buffer = ExAllocatePool(PagedPool, Source->MaximumLength); if (!Buffer) return STATUS_NO_MEMORY; - RtlCopyMemory(Buffer, Temp, Length * sizeof(WCHAR)); + RtlCopyMemory(Buffer, Source->Buffer, Source->MaximumLength); Irp->IoStatus.Information = (ULONG_PTR)Buffer; return STATUS_SUCCESS; }
4 years, 9 months
1
0
0
0
[reactos] 03/10: [ISAPNP] Extract function to create DOs
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=89aff07a671332065c408…
commit 89aff07a671332065c408c23806ee1fd05683e4b Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Mon Mar 16 18:07:24 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Extract function to create DOs --- drivers/bus/isapnp/fdo.c | 57 +------------------------------------- drivers/bus/isapnp/isapnp.c | 67 +++++++++++++++++++++++++++++++++++++++++++++ drivers/bus/isapnp/isapnp.h | 6 ++++ 3 files changed, 74 insertions(+), 56 deletions(-) diff --git a/drivers/bus/isapnp/fdo.c b/drivers/bus/isapnp/fdo.c index 5e6931d07f0..6417d6e68bc 100644 --- a/drivers/bus/isapnp/fdo.c +++ b/drivers/bus/isapnp/fdo.c @@ -44,13 +44,8 @@ IsaFdoQueryDeviceRelations( IN PIRP Irp, IN PIO_STACK_LOCATION IrpSp) { - PISAPNP_PDO_EXTENSION PdoExt; NTSTATUS Status; - PLIST_ENTRY CurrentEntry; - PISAPNP_LOGICAL_DEVICE IsaDevice; - PDEVICE_RELATIONS DeviceRelations; KIRQL OldIrql; - ULONG i = 0; if (IrpSp->Parameters.QueryDeviceRelations.Type != BusRelations) return Irp->IoStatus.Status; @@ -64,57 +59,7 @@ IsaFdoQueryDeviceRelations( return Status; } - DeviceRelations = ExAllocatePool(NonPagedPool, - sizeof(DEVICE_RELATIONS) + sizeof(DEVICE_OBJECT) * (FdoExt->DeviceCount - 1)); - if (!DeviceRelations) - { - return STATUS_NO_MEMORY; - } - - CurrentEntry = FdoExt->DeviceListHead.Flink; - while (CurrentEntry != &FdoExt->DeviceListHead) - { - IsaDevice = CONTAINING_RECORD(CurrentEntry, ISAPNP_LOGICAL_DEVICE, ListEntry); - - if (!IsaDevice->Pdo) - { - Status = IoCreateDevice(FdoExt->DriverObject, - sizeof(ISAPNP_PDO_EXTENSION), - NULL, - FILE_DEVICE_CONTROLLER, - FILE_DEVICE_SECURE_OPEN | FILE_AUTOGENERATED_DEVICE_NAME, - FALSE, - &IsaDevice->Pdo); - if (!NT_SUCCESS(Status)) - { - break; - } - - IsaDevice->Pdo->Flags &= ~DO_DEVICE_INITIALIZING; - - //Device->Pdo->Flags |= DO_POWER_PAGABLE; - - PdoExt = (PISAPNP_PDO_EXTENSION)IsaDevice->Pdo->DeviceExtension; - - RtlZeroMemory(PdoExt, sizeof(ISAPNP_PDO_EXTENSION)); - - PdoExt->Common.IsFdo = FALSE; - PdoExt->Common.Self = IsaDevice->Pdo; - PdoExt->Common.State = dsStopped; - PdoExt->IsaPnpDevice = IsaDevice; - } - DeviceRelations->Objects[i++] = IsaDevice->Pdo; - - ObReferenceObject(IsaDevice->Pdo); - - CurrentEntry = CurrentEntry->Flink; - } - - DeviceRelations->Count = FdoExt->DeviceCount; - - Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; - - return STATUS_SUCCESS; + return IsaPnpFillDeviceRelations(FdoExt, Irp); } NTSTATUS diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c index d3d600a75d3..6fc29e9e70c 100644 --- a/drivers/bus/isapnp/isapnp.c +++ b/drivers/bus/isapnp/isapnp.c @@ -10,6 +10,73 @@ #define NDEBUG #include <debug.h> +NTSTATUS +NTAPI +IsaPnpFillDeviceRelations( + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp) +{ + PISAPNP_PDO_EXTENSION PdoExt; + NTSTATUS Status = STATUS_SUCCESS; + PLIST_ENTRY CurrentEntry; + PISAPNP_LOGICAL_DEVICE IsaDevice; + PDEVICE_RELATIONS DeviceRelations; + ULONG i = 0; + + DeviceRelations = ExAllocatePool(NonPagedPool, + sizeof(DEVICE_RELATIONS) + sizeof(DEVICE_OBJECT) * FdoExt->DeviceCount); + if (!DeviceRelations) + { + return STATUS_NO_MEMORY; + } + + CurrentEntry = FdoExt->DeviceListHead.Flink; + while (CurrentEntry != &FdoExt->DeviceListHead) + { + IsaDevice = CONTAINING_RECORD(CurrentEntry, ISAPNP_LOGICAL_DEVICE, ListEntry); + + if (!IsaDevice->Pdo) + { + Status = IoCreateDevice(FdoExt->DriverObject, + sizeof(ISAPNP_PDO_EXTENSION), + NULL, + FILE_DEVICE_CONTROLLER, + FILE_DEVICE_SECURE_OPEN | FILE_AUTOGENERATED_DEVICE_NAME, + FALSE, + &IsaDevice->Pdo); + if (!NT_SUCCESS(Status)) + { + break; + } + + IsaDevice->Pdo->Flags &= ~DO_DEVICE_INITIALIZING; + + //Device->Pdo->Flags |= DO_POWER_PAGABLE; + + PdoExt = (PISAPNP_PDO_EXTENSION)IsaDevice->Pdo->DeviceExtension; + + RtlZeroMemory(PdoExt, sizeof(ISAPNP_PDO_EXTENSION)); + + PdoExt->Common.IsFdo = FALSE; + PdoExt->Common.Self = IsaDevice->Pdo; + PdoExt->Common.State = dsStopped; + PdoExt->IsaPnpDevice = IsaDevice; + } + DeviceRelations->Objects[i++] = IsaDevice->Pdo; + + ObReferenceObject(IsaDevice->Pdo); + + CurrentEntry = CurrentEntry->Flink; + } + + DeviceRelations->Count = i; + + Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; + + return Status; +} + + static IO_COMPLETION_ROUTINE ForwardIrpCompletion; static diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h index 633341d5f99..e247643112c 100644 --- a/drivers/bus/isapnp/isapnp.h +++ b/drivers/bus/isapnp/isapnp.h @@ -51,6 +51,12 @@ typedef struct _ISAPNP_PDO_EXTENSION { /* isapnp.c */ +NTSTATUS +NTAPI +IsaPnpFillDeviceRelations( + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp); + DRIVER_INITIALIZE DriverEntry; NTSTATUS
4 years, 9 months
1
0
0
0
[reactos] 02/10: [ISAPNP] Fix some return codes
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d0c7bd98c7ab988f9b231…
commit d0c7bd98c7ab988f9b231b184cdee5e5629b80ec Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Fri Mar 20 19:41:55 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Fix some return codes --- drivers/bus/isapnp/hardware.c | 2 +- drivers/bus/isapnp/pdo.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/bus/isapnp/hardware.c b/drivers/bus/isapnp/hardware.c index 0803a782616..77ca6c40b4b 100644 --- a/drivers/bus/isapnp/hardware.c +++ b/drivers/bus/isapnp/hardware.c @@ -564,7 +564,7 @@ IsaHwDetectReadDataPort( if (!FdoExt->ReadDataPort) { DPRINT1("No read data port found\n"); - return STATUS_UNSUCCESSFUL; + return STATUS_INSUFFICIENT_RESOURCES; } DPRINT1("Detected read data port at 0x%p\n", FdoExt->ReadDataPort); diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c index c77a2bb173b..4a674a05e0f 100644 --- a/drivers/bus/isapnp/pdo.c +++ b/drivers/bus/isapnp/pdo.c @@ -24,7 +24,7 @@ IsaPdoQueryDeviceRelations( DeviceRelations = ExAllocatePool(PagedPool, sizeof(*DeviceRelations)); if (!DeviceRelations) - return STATUS_INSUFFICIENT_RESOURCES; + return STATUS_NO_MEMORY; DeviceRelations->Count = 1; DeviceRelations->Objects[0] = PdoExt->Common.Self; @@ -47,7 +47,7 @@ IsaPdoQueryCapabilities( DeviceCapabilities = IrpSp->Parameters.DeviceCapabilities.Capabilities; if (DeviceCapabilities->Version != 1) - return STATUS_UNSUCCESSFUL; + return STATUS_REVISION_MISMATCH; DeviceCapabilities->UniqueID = LogDev->SerialNumber != 0xffffffff; DeviceCapabilities->Address = LogDev->CSN;
4 years, 9 months
1
0
0
0
[reactos] 01/10: [ISAPNP] Reformat files. No code change.
by Hervé Poussineau
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=947b49aac3da39e3516ed…
commit 947b49aac3da39e3516ed31fb5f77d38d004995d Author: Hervé Poussineau <hpoussin(a)reactos.org> AuthorDate: Fri Mar 20 19:19:30 2020 +0100 Commit: Hervé Poussineau <hpoussin(a)reactos.org> CommitDate: Fri Mar 20 22:40:11 2020 +0100 [ISAPNP] Reformat files. No code change. --- drivers/bus/isapnp/fdo.c | 242 ++++++++--------- drivers/bus/isapnp/hardware.c | 594 ++++++++++++++++++++++-------------------- drivers/bus/isapnp/isapnp.c | 239 +++++++++-------- drivers/bus/isapnp/isapnp.h | 76 +++--- drivers/bus/isapnp/isapnphw.h | 20 +- drivers/bus/isapnp/pdo.c | 276 ++++++++++---------- 6 files changed, 742 insertions(+), 705 deletions(-) diff --git a/drivers/bus/isapnp/fdo.c b/drivers/bus/isapnp/fdo.c index 1529267b1c4..5e6931d07f0 100644 --- a/drivers/bus/isapnp/fdo.c +++ b/drivers/bus/isapnp/fdo.c @@ -13,156 +13,156 @@ NTSTATUS NTAPI IsaFdoStartDevice( - IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp) + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) { - NTSTATUS Status; - KIRQL OldIrql; + NTSTATUS Status; + KIRQL OldIrql; - UNREFERENCED_PARAMETER(Irp); - UNREFERENCED_PARAMETER(IrpSp); + UNREFERENCED_PARAMETER(Irp); + UNREFERENCED_PARAMETER(IrpSp); - KeAcquireSpinLock(&FdoExt->Lock, &OldIrql); - Status = IsaHwDetectReadDataPort(FdoExt); - KeReleaseSpinLock(&FdoExt->Lock, OldIrql); + KeAcquireSpinLock(&FdoExt->Lock, &OldIrql); + Status = IsaHwDetectReadDataPort(FdoExt); + KeReleaseSpinLock(&FdoExt->Lock, OldIrql); - if (!NT_SUCCESS(Status)) - { - return Status; - } + if (!NT_SUCCESS(Status)) + { + return Status; + } - FdoExt->Common.State = dsStarted; + FdoExt->Common.State = dsStarted; - return STATUS_SUCCESS; + return STATUS_SUCCESS; } NTSTATUS NTAPI IsaFdoQueryDeviceRelations( - IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp) + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) { - PISAPNP_PDO_EXTENSION PdoExt; - NTSTATUS Status; - PLIST_ENTRY CurrentEntry; - PISAPNP_LOGICAL_DEVICE IsaDevice; - PDEVICE_RELATIONS DeviceRelations; - KIRQL OldIrql; - ULONG i = 0; - - if (IrpSp->Parameters.QueryDeviceRelations.Type != BusRelations) - return Irp->IoStatus.Status; - - KeAcquireSpinLock(&FdoExt->Lock, &OldIrql); - Status = IsaHwFillDeviceList(FdoExt); - KeReleaseSpinLock(&FdoExt->Lock, OldIrql); - - if (!NT_SUCCESS(Status)) - { - return Status; - } - - DeviceRelations = ExAllocatePool(NonPagedPool, - sizeof(DEVICE_RELATIONS) + sizeof(DEVICE_OBJECT) * (FdoExt->DeviceCount - 1)); - if (!DeviceRelations) - { - return STATUS_NO_MEMORY; - } - - CurrentEntry = FdoExt->DeviceListHead.Flink; - while (CurrentEntry != &FdoExt->DeviceListHead) - { - IsaDevice = CONTAINING_RECORD(CurrentEntry, ISAPNP_LOGICAL_DEVICE, ListEntry); - - if (!IsaDevice->Pdo) - { - Status = IoCreateDevice(FdoExt->DriverObject, - sizeof(ISAPNP_PDO_EXTENSION), - NULL, - FILE_DEVICE_CONTROLLER, - FILE_DEVICE_SECURE_OPEN | FILE_AUTOGENERATED_DEVICE_NAME, - FALSE, - &IsaDevice->Pdo); - if (!NT_SUCCESS(Status)) - { - break; - } - - IsaDevice->Pdo->Flags &= ~DO_DEVICE_INITIALIZING; - - //Device->Pdo->Flags |= DO_POWER_PAGABLE; - - PdoExt = (PISAPNP_PDO_EXTENSION)IsaDevice->Pdo->DeviceExtension; - - RtlZeroMemory(PdoExt, sizeof(ISAPNP_PDO_EXTENSION)); - - PdoExt->Common.IsFdo = FALSE; - PdoExt->Common.Self = IsaDevice->Pdo; - PdoExt->Common.State = dsStopped; - PdoExt->IsaPnpDevice = IsaDevice; - } - DeviceRelations->Objects[i++] = IsaDevice->Pdo; - - ObReferenceObject(IsaDevice->Pdo); - - CurrentEntry = CurrentEntry->Flink; - } - - DeviceRelations->Count = FdoExt->DeviceCount; - - Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; - - return STATUS_SUCCESS; + PISAPNP_PDO_EXTENSION PdoExt; + NTSTATUS Status; + PLIST_ENTRY CurrentEntry; + PISAPNP_LOGICAL_DEVICE IsaDevice; + PDEVICE_RELATIONS DeviceRelations; + KIRQL OldIrql; + ULONG i = 0; + + if (IrpSp->Parameters.QueryDeviceRelations.Type != BusRelations) + return Irp->IoStatus.Status; + + KeAcquireSpinLock(&FdoExt->Lock, &OldIrql); + Status = IsaHwFillDeviceList(FdoExt); + KeReleaseSpinLock(&FdoExt->Lock, OldIrql); + + if (!NT_SUCCESS(Status)) + { + return Status; + } + + DeviceRelations = ExAllocatePool(NonPagedPool, + sizeof(DEVICE_RELATIONS) + sizeof(DEVICE_OBJECT) * (FdoExt->DeviceCount - 1)); + if (!DeviceRelations) + { + return STATUS_NO_MEMORY; + } + + CurrentEntry = FdoExt->DeviceListHead.Flink; + while (CurrentEntry != &FdoExt->DeviceListHead) + { + IsaDevice = CONTAINING_RECORD(CurrentEntry, ISAPNP_LOGICAL_DEVICE, ListEntry); + + if (!IsaDevice->Pdo) + { + Status = IoCreateDevice(FdoExt->DriverObject, + sizeof(ISAPNP_PDO_EXTENSION), + NULL, + FILE_DEVICE_CONTROLLER, + FILE_DEVICE_SECURE_OPEN | FILE_AUTOGENERATED_DEVICE_NAME, + FALSE, + &IsaDevice->Pdo); + if (!NT_SUCCESS(Status)) + { + break; + } + + IsaDevice->Pdo->Flags &= ~DO_DEVICE_INITIALIZING; + + //Device->Pdo->Flags |= DO_POWER_PAGABLE; + + PdoExt = (PISAPNP_PDO_EXTENSION)IsaDevice->Pdo->DeviceExtension; + + RtlZeroMemory(PdoExt, sizeof(ISAPNP_PDO_EXTENSION)); + + PdoExt->Common.IsFdo = FALSE; + PdoExt->Common.Self = IsaDevice->Pdo; + PdoExt->Common.State = dsStopped; + PdoExt->IsaPnpDevice = IsaDevice; + } + DeviceRelations->Objects[i++] = IsaDevice->Pdo; + + ObReferenceObject(IsaDevice->Pdo); + + CurrentEntry = CurrentEntry->Flink; + } + + DeviceRelations->Count = FdoExt->DeviceCount; + + Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; + + return STATUS_SUCCESS; } NTSTATUS NTAPI IsaFdoPnp( - IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp) + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) { - NTSTATUS Status = Irp->IoStatus.Status; + NTSTATUS Status = Irp->IoStatus.Status; - switch (IrpSp->MinorFunction) - { - case IRP_MN_START_DEVICE: - Status = IsaForwardIrpSynchronous(FdoExt, Irp); + switch (IrpSp->MinorFunction) + { + case IRP_MN_START_DEVICE: + Status = IsaForwardIrpSynchronous(FdoExt, Irp); - if (NT_SUCCESS(Status)) - Status = IsaFdoStartDevice(FdoExt, Irp, IrpSp); + if (NT_SUCCESS(Status)) + Status = IsaFdoStartDevice(FdoExt, Irp, IrpSp); - Irp->IoStatus.Status = Status; + Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; - case IRP_MN_STOP_DEVICE: - FdoExt->Common.State = dsStopped; + case IRP_MN_STOP_DEVICE: + FdoExt->Common.State = dsStopped; - Status = STATUS_SUCCESS; - break; + Status = STATUS_SUCCESS; + break; - case IRP_MN_QUERY_DEVICE_RELATIONS: - Status = IsaFdoQueryDeviceRelations(FdoExt, Irp, IrpSp); + case IRP_MN_QUERY_DEVICE_RELATIONS: + Status = IsaFdoQueryDeviceRelations(FdoExt, Irp, IrpSp); - Irp->IoStatus.Status = Status; + Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); - return Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; - case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: - DPRINT("IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"); - break; + case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: + DPRINT("IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"); + break; - default: - DPRINT1("Unknown PnP code: %x\n", IrpSp->MinorFunction); - break; - } + default: + DPRINT1("Unknown PnP code: %x\n", IrpSp->MinorFunction); + break; + } - IoSkipCurrentIrpStackLocation(Irp); + IoSkipCurrentIrpStackLocation(Irp); - return IoCallDriver(FdoExt->Ldo, Irp); + return IoCallDriver(FdoExt->Ldo, Irp); } diff --git a/drivers/bus/isapnp/hardware.c b/drivers/bus/isapnp/hardware.c index df3d8e398a7..0803a782616 100644 --- a/drivers/bus/isapnp/hardware.c +++ b/drivers/bus/isapnp/hardware.c @@ -14,60 +14,70 @@ static inline VOID -WriteAddress(USHORT Address) +WriteAddress( + IN USHORT Address) { - WRITE_PORT_UCHAR((PUCHAR)ISAPNP_ADDRESS, Address); + WRITE_PORT_UCHAR((PUCHAR)ISAPNP_ADDRESS, Address); } static inline VOID -WriteData(USHORT Data) +WriteData( + IN USHORT Data) { - WRITE_PORT_UCHAR((PUCHAR)ISAPNP_WRITE_DATA, Data); + WRITE_PORT_UCHAR((PUCHAR)ISAPNP_WRITE_DATA, Data); } static inline UCHAR -ReadData(PUCHAR ReadDataPort) +ReadData( + IN PUCHAR ReadDataPort) { - return READ_PORT_UCHAR(ReadDataPort); + return READ_PORT_UCHAR(ReadDataPort); } static inline VOID -WriteByte(USHORT Address, USHORT Value) +WriteByte( + IN USHORT Address, + IN USHORT Value) { - WriteAddress(Address); - WriteData(Value); + WriteAddress(Address); + WriteData(Value); } static inline UCHAR -ReadByte(PUCHAR ReadDataPort, USHORT Address) +ReadByte( + IN PUCHAR ReadDataPort, + IN USHORT Address) { - WriteAddress(Address); - return ReadData(ReadDataPort); + WriteAddress(Address); + return ReadData(ReadDataPort); } static inline USHORT -ReadWord(PUCHAR ReadDataPort, USHORT Address) +ReadWord( + IN PUCHAR ReadDataPort, + IN USHORT Address) { - return ((ReadByte(ReadDataPort, Address) << 8) | - (ReadByte(ReadDataPort, Address + 1))); + return ((ReadByte(ReadDataPort, Address) << 8) | + (ReadByte(ReadDataPort, Address + 1))); } static inline VOID -SetReadDataPort(PUCHAR ReadDataPort) +SetReadDataPort( + IN PUCHAR ReadDataPort) { - WriteByte(ISAPNP_READPORT, ((ULONG_PTR)ReadDataPort >> 2)); + WriteByte(ISAPNP_READPORT, ((ULONG_PTR)ReadDataPort >> 2)); } static @@ -75,7 +85,7 @@ inline VOID EnterIsolationState(VOID) { - WriteAddress(ISAPNP_SERIALISOLATION); + WriteAddress(ISAPNP_SERIALISOLATION); } static @@ -83,7 +93,7 @@ inline VOID WaitForKey(VOID) { - WriteByte(ISAPNP_CONFIGCONTROL, ISAPNP_CONFIG_WAIT_FOR_KEY); + WriteByte(ISAPNP_CONFIGCONTROL, ISAPNP_CONFIG_WAIT_FOR_KEY); } static @@ -91,81 +101,92 @@ inline VOID ResetCsn(VOID) { - WriteByte(ISAPNP_CONFIGCONTROL, ISAPNP_CONFIG_RESET_CSN); + WriteByte(ISAPNP_CONFIGCONTROL, ISAPNP_CONFIG_RESET_CSN); } static inline VOID -Wake(USHORT Csn) +Wake( + IN USHORT Csn) { - WriteByte(ISAPNP_WAKE, Csn); + WriteByte(ISAPNP_WAKE, Csn); } static inline USHORT -ReadResourceData(PUCHAR ReadDataPort) +ReadResourceData( + IN PUCHAR ReadDataPort) { - return ReadByte(ReadDataPort, ISAPNP_RESOURCEDATA); + return ReadByte(ReadDataPort, ISAPNP_RESOURCEDATA); } static inline USHORT -ReadStatus(PUCHAR ReadDataPort) +ReadStatus( + IN PUCHAR ReadDataPort) { - return ReadByte(ReadDataPort, ISAPNP_STATUS); + return ReadByte(ReadDataPort, ISAPNP_STATUS); } static inline VOID -WriteCsn(USHORT Csn) +WriteCsn( + IN USHORT Csn) { - WriteByte(ISAPNP_CARDSELECTNUMBER, Csn); + WriteByte(ISAPNP_CARDSELECTNUMBER, Csn); } static inline VOID -WriteLogicalDeviceNumber(USHORT LogDev) +WriteLogicalDeviceNumber( + IN USHORT LogDev) { - WriteByte(ISAPNP_LOGICALDEVICENUMBER, LogDev); + WriteByte(ISAPNP_LOGICALDEVICENUMBER, LogDev); } static inline VOID -ActivateDevice(USHORT LogDev) +ActivateDevice( + IN USHORT LogDev) { - WriteLogicalDeviceNumber(LogDev); - WriteByte(ISAPNP_ACTIVATE, 1); + WriteLogicalDeviceNumber(LogDev); + WriteByte(ISAPNP_ACTIVATE, 1); } static inline VOID -DeactivateDevice(USHORT LogDev) +DeactivateDevice( + IN USHORT LogDev) { - WriteLogicalDeviceNumber(LogDev); - WriteByte(ISAPNP_ACTIVATE, 0); + WriteLogicalDeviceNumber(LogDev); + WriteByte(ISAPNP_ACTIVATE, 0); } static inline USHORT -ReadIoBase(PUCHAR ReadDataPort, USHORT Index) +ReadIoBase( + IN PUCHAR ReadDataPort, + IN USHORT Index) { - return ReadWord(ReadDataPort, ISAPNP_IOBASE(Index)); + return ReadWord(ReadDataPort, ISAPNP_IOBASE(Index)); } static inline USHORT -ReadIrqNo(PUCHAR ReadDataPort, USHORT Index) +ReadIrqNo( + IN PUCHAR ReadDataPort, + IN USHORT Index) { - return ReadByte(ReadDataPort, ISAPNP_IRQNO(Index)); + return ReadByte(ReadDataPort, ISAPNP_IRQNO(Index)); } static @@ -173,348 +194,365 @@ inline VOID HwDelay(VOID) { - KeStallExecutionProcessor(1000); + KeStallExecutionProcessor(1000); } static inline UCHAR -NextLFSR(UCHAR Lfsr, UCHAR InputBit) +NextLFSR( + IN UCHAR Lfsr, + IN UCHAR InputBit) { - UCHAR NextLfsr = Lfsr >> 1; + UCHAR NextLfsr = Lfsr >> 1; - NextLfsr |= (((Lfsr ^ NextLfsr) ^ InputBit)) << 7; + NextLfsr |= (((Lfsr ^ NextLfsr) ^ InputBit)) << 7; - return NextLfsr; + return NextLfsr; } static VOID SendKey(VOID) { - UCHAR i, Lfsr; + UCHAR i, Lfsr; - HwDelay(); - WriteAddress(0x00); - WriteAddress(0x00); + HwDelay(); + WriteAddress(0x00); + WriteAddress(0x00); - Lfsr = ISAPNP_LFSR_SEED; - for (i = 0; i < 32; i++) - { - WriteAddress(Lfsr); - Lfsr = NextLFSR(Lfsr, 0); - } + Lfsr = ISAPNP_LFSR_SEED; + for (i = 0; i < 32; i++) + { + WriteAddress(Lfsr); + Lfsr = NextLFSR(Lfsr, 0); + } } static USHORT -PeekByte(PUCHAR ReadDataPort) +PeekByte( + IN PUCHAR ReadDataPort) { - USHORT i; + USHORT i; - for (i = 0; i < 20; i++) - { - if (ReadStatus(ReadDataPort) & 0x01) - return ReadResourceData(ReadDataPort); + for (i = 0; i < 20; i++) + { + if (ReadStatus(ReadDataPort) & 0x01) + return ReadResourceData(ReadDataPort); - HwDelay(); - } + HwDelay(); + } - return 0xFF; + return 0xFF; } static VOID -Peek(PUCHAR ReadDataPort, PVOID Buffer, ULONG Length) +Peek( + IN PUCHAR ReadDataPort, + IN OUT PVOID Buffer, + IN ULONG Length) { - USHORT i, byte; + USHORT i, Byte; - for (i = 0; i < Length; i++) - { - byte = PeekByte(ReadDataPort); - if (Buffer) - *((PUCHAR)Buffer + i) = byte; - } + for (i = 0; i < Length; i++) + { + Byte = PeekByte(ReadDataPort); + if (Buffer) + *((PUCHAR)Buffer + i) = Byte; + } } static USHORT -IsaPnpChecksum(PISAPNP_IDENTIFIER Identifier) +IsaPnpChecksum( + IN PISAPNP_IDENTIFIER Identifier) { - UCHAR i, j, Lfsr, Byte; + UCHAR i, j, Lfsr, Byte; - Lfsr = ISAPNP_LFSR_SEED; - for (i = 0; i < 8; i++) - { - Byte = *(((PUCHAR)Identifier) + i); - for (j = 0; j < 8; j++) + Lfsr = ISAPNP_LFSR_SEED; + for (i = 0; i < 8; i++) { - Lfsr = NextLFSR(Lfsr, Byte); - Byte >>= 1; + Byte = *(((PUCHAR)Identifier) + i); + for (j = 0; j < 8; j++) + { + Lfsr = NextLFSR(Lfsr, Byte); + Byte >>= 1; + } } - } - return Lfsr; + return Lfsr; } static BOOLEAN -FindTag(PUCHAR ReadDataPort, USHORT WantedTag, PVOID Buffer, ULONG Length) +FindTag( + IN PUCHAR ReadDataPort, + IN USHORT WantedTag, + IN OUT PVOID Buffer, + IN ULONG Length) { - USHORT Tag, TagLen; + USHORT Tag, TagLen; - do - { - Tag = PeekByte(ReadDataPort); - if (ISAPNP_IS_SMALL_TAG(Tag)) - { - TagLen = ISAPNP_SMALL_TAG_LEN(Tag); - Tag = ISAPNP_SMALL_TAG_NAME(Tag); - } - else + do { - TagLen = PeekByte(ReadDataPort) + (PeekByte(ReadDataPort) << 8); - Tag = ISAPNP_LARGE_TAG_NAME(Tag); - } + Tag = PeekByte(ReadDataPort); + if (ISAPNP_IS_SMALL_TAG(Tag)) + { + TagLen = ISAPNP_SMALL_TAG_LEN(Tag); + Tag = ISAPNP_SMALL_TAG_NAME(Tag); + } + else + { + TagLen = PeekByte(ReadDataPort) + (PeekByte(ReadDataPort) << 8); + Tag = ISAPNP_LARGE_TAG_NAME(Tag); + } - if (Tag == WantedTag) - { - if (Length > TagLen) - Length = TagLen; + if (Tag == WantedTag) + { + if (Length > TagLen) + Length = TagLen; - Peek(ReadDataPort, Buffer, Length); + Peek(ReadDataPort, Buffer, Length); - return TRUE; - } - else - { - Peek(ReadDataPort, NULL, TagLen); - } - } while (Tag != ISAPNP_TAG_END); + return TRUE; + } + else + { + Peek(ReadDataPort, NULL, TagLen); + } + } while (Tag != ISAPNP_TAG_END); - return FALSE; + return FALSE; } static BOOLEAN -FindLogDevId(PUCHAR ReadDataPort, USHORT LogDev, PISAPNP_LOGDEVID LogDeviceId) +FindLogDevId( + IN PUCHAR ReadDataPort, + IN USHORT LogDev, + IN OUT PISAPNP_LOGDEVID LogDeviceId) { - USHORT i; + USHORT i; - for (i = 0; i <= LogDev; i++) - { - if (!FindTag(ReadDataPort, ISAPNP_TAG_LOGDEVID, LogDeviceId, sizeof(*LogDeviceId))) - return FALSE; - } + for (i = 0; i <= LogDev; i++) + { + if (!FindTag(ReadDataPort, ISAPNP_TAG_LOGDEVID, LogDeviceId, sizeof(*LogDeviceId))) + return FALSE; + } - return TRUE; + return TRUE; } static INT -TryIsolate(PUCHAR ReadDataPort) +TryIsolate( + IN PUCHAR ReadDataPort) { - ISAPNP_IDENTIFIER Identifier; - USHORT i, j; - BOOLEAN Seen55aa, SeenLife; - INT Csn = 0; - USHORT Byte, Data; + ISAPNP_IDENTIFIER Identifier; + USHORT i, j; + BOOLEAN Seen55aa, SeenLife; + INT Csn = 0; + USHORT Byte, Data; - DPRINT("Setting read data port: 0x%p\n", ReadDataPort); + DPRINT("Setting read data port: 0x%p\n", ReadDataPort); - WaitForKey(); - SendKey(); + WaitForKey(); + SendKey(); - ResetCsn(); - HwDelay(); - HwDelay(); - - WaitForKey(); - SendKey(); - Wake(0x00); + ResetCsn(); + HwDelay(); + HwDelay(); - SetReadDataPort(ReadDataPort); - HwDelay(); + WaitForKey(); + SendKey(); + Wake(0x00); - while (TRUE) - { - EnterIsolationState(); + SetReadDataPort(ReadDataPort); HwDelay(); - RtlZeroMemory(&Identifier, sizeof(Identifier)); - - Seen55aa = SeenLife = FALSE; - for (i = 0; i < 9; i++) + while (TRUE) { - Byte = 0; - for (j = 0; j < 8; j++) - { - Data = ReadData(ReadDataPort); - HwDelay(); - Data = ((Data << 8) | ReadData(ReadDataPort)); + EnterIsolationState(); HwDelay(); - Byte >>= 1; - if (Data != 0xFFFF) + RtlZeroMemory(&Identifier, sizeof(Identifier)); + + Seen55aa = SeenLife = FALSE; + for (i = 0; i < 9; i++) { - SeenLife = TRUE; - if (Data == 0x55AA) - { - Byte |= 0x80; - Seen55aa = TRUE; - } + Byte = 0; + for (j = 0; j < 8; j++) + { + Data = ReadData(ReadDataPort); + HwDelay(); + Data = ((Data << 8) | ReadData(ReadDataPort)); + HwDelay(); + Byte >>= 1; + + if (Data != 0xFFFF) + { + SeenLife = TRUE; + if (Data == 0x55AA) + { + Byte |= 0x80; + Seen55aa = TRUE; + } + } + } + *(((PUCHAR)&Identifier) + i) = Byte; } - } - *(((PUCHAR)&Identifier) + i) = Byte; - } - if (!Seen55aa) - { - if (Csn) - { - DPRINT("Found no more cards\n"); - } - else - { - if (SeenLife) - { - DPRINT("Saw life but no cards, trying new read port\n"); - Csn = -1; - } - else - { - DPRINT("Saw no sign of life, abandoning isolation\n"); - } - } - break; - } + if (!Seen55aa) + { + if (Csn) + { + DPRINT("Found no more cards\n"); + } + else + { + if (SeenLife) + { + DPRINT("Saw life but no cards, trying new read port\n"); + Csn = -1; + } + else + { + DPRINT("Saw no sign of life, abandoning isolation\n"); + } + } + break; + } - if (Identifier.Checksum != IsaPnpChecksum(&Identifier)) - { - DPRINT("Bad checksum, trying next read data port\n"); - Csn = -1; - break; - } + if (Identifier.Checksum != IsaPnpChecksum(&Identifier)) + { + DPRINT("Bad checksum, trying next read data port\n"); + Csn = -1; + break; + } - Csn++; + Csn++; - WriteCsn(Csn); - HwDelay(); + WriteCsn(Csn); + HwDelay(); - Wake(0x00); - HwDelay(); - } + Wake(0x00); + HwDelay(); + } - WaitForKey(); + WaitForKey(); - if (Csn > 0) - { - DPRINT("Found %d cards at read port 0x%p\n", Csn, ReadDataPort); - } + if (Csn > 0) + { + DPRINT("Found %d cards at read port 0x%p\n", Csn, ReadDataPort); + } - return Csn; + return Csn; } static PUCHAR Isolate(VOID) { - PUCHAR ReadPort; + PUCHAR ReadPort; - for (ReadPort = (PUCHAR)ISAPNP_READ_PORT_START; - (ULONG_PTR)ReadPort <= ISAPNP_READ_PORT_MAX; - ReadPort += ISAPNP_READ_PORT_STEP) - { - /* Avoid the NE2000 probe space */ - if ((ULONG_PTR)ReadPort >= 0x280 && - (ULONG_PTR)ReadPort <= 0x380) - continue; + for (ReadPort = (PUCHAR)ISAPNP_READ_PORT_START; + (ULONG_PTR)ReadPort <= ISAPNP_READ_PORT_MAX; + ReadPort += ISAPNP_READ_PORT_STEP) + { + /* Avoid the NE2000 probe space */ + if ((ULONG_PTR)ReadPort >= 0x280 && + (ULONG_PTR)ReadPort <= 0x380) + continue; - if (TryIsolate(ReadPort) > 0) - return ReadPort; - } + if (TryIsolate(ReadPort) > 0) + return ReadPort; + } - return 0; + return 0; } VOID -DeviceActivation(PISAPNP_LOGICAL_DEVICE IsaDevice, - BOOLEAN Activate) +DeviceActivation( + IN PISAPNP_LOGICAL_DEVICE IsaDevice, + IN BOOLEAN Activate) { - WaitForKey(); - SendKey(); - Wake(IsaDevice->CSN); + WaitForKey(); + SendKey(); + Wake(IsaDevice->CSN); - if (Activate) - ActivateDevice(IsaDevice->LDN); - else - DeactivateDevice(IsaDevice->LDN); + if (Activate) + ActivateDevice(IsaDevice->LDN); + else + DeactivateDevice(IsaDevice->LDN); - HwDelay(); + HwDelay(); - WaitForKey(); + WaitForKey(); } NTSTATUS -ProbeIsaPnpBus(PISAPNP_FDO_EXTENSION FdoExt) +ProbeIsaPnpBus( + IN PISAPNP_FDO_EXTENSION FdoExt) { - PISAPNP_LOGICAL_DEVICE LogDevice; - ISAPNP_IDENTIFIER Identifier; - ISAPNP_LOGDEVID LogDevId; - USHORT Csn; - USHORT LogDev; + PISAPNP_LOGICAL_DEVICE LogDevice; + ISAPNP_IDENTIFIER Identifier; + ISAPNP_LOGDEVID LogDevId; + USHORT Csn; + USHORT LogDev; - ASSERT(FdoExt->ReadDataPort); + ASSERT(FdoExt->ReadDataPort); - for (Csn = 1; Csn <= 0xFF; Csn++) - { - for (LogDev = 0; LogDev <= 0xFF; LogDev++) + for (Csn = 1; Csn <= 0xFF; Csn++) { - LogDevice = ExAllocatePool(NonPagedPool, sizeof(ISAPNP_LOGICAL_DEVICE)); - if (!LogDevice) - return STATUS_NO_MEMORY; + for (LogDev = 0; LogDev <= 0xFF; LogDev++) + { + LogDevice = ExAllocatePool(NonPagedPool, sizeof(ISAPNP_LOGICAL_DEVICE)); + if (!LogDevice) + return STATUS_NO_MEMORY; - RtlZeroMemory(LogDevice, sizeof(ISAPNP_LOGICAL_DEVICE)); + RtlZeroMemory(LogDevice, sizeof(ISAPNP_LOGICAL_DEVICE)); - LogDevice->CSN = Csn; - LogDevice->LDN = LogDev; + LogDevice->CSN = Csn; + LogDevice->LDN = LogDev; - WaitForKey(); - SendKey(); - Wake(Csn); + WaitForKey(); + SendKey(); + Wake(Csn); - Peek(FdoExt->ReadDataPort, &Identifier, sizeof(Identifier)); + Peek(FdoExt->ReadDataPort, &Identifier, sizeof(Identifier)); - if (Identifier.VendorId & 0x80) - { - ExFreePool(LogDevice); - return STATUS_SUCCESS; - } + if (Identifier.VendorId & 0x80) + { + ExFreePool(LogDevice); + return STATUS_SUCCESS; + } - if (!FindLogDevId(FdoExt->ReadDataPort, LogDev, &LogDevId)) - break; + if (!FindLogDevId(FdoExt->ReadDataPort, LogDev, &LogDevId)) + break; - WriteLogicalDeviceNumber(LogDev); + WriteLogicalDeviceNumber(LogDev); - LogDevice->VendorId[0] = ((LogDevId.VendorId >> 2) & 0x1f) + 'A' - 1, - LogDevice->VendorId[1] = (((LogDevId.VendorId & 0x3) << 3) | ((LogDevId.VendorId >> 13) & 0x7)) + 'A' - 1, - LogDevice->VendorId[2] = ((LogDevId.VendorId >> 8) & 0x1f) + 'A' - 1, - LogDevice->ProdId = RtlUshortByteSwap(LogDevId.ProdId); - LogDevice->SerialNumber = Identifier.Serial; - LogDevice->IoAddr = ReadIoBase(FdoExt->ReadDataPort, 0); - LogDevice->IrqNo = ReadIrqNo(FdoExt->ReadDataPort, 0); + LogDevice->VendorId[0] = ((LogDevId.VendorId >> 2) & 0x1f) + 'A' - 1, + LogDevice->VendorId[1] = (((LogDevId.VendorId & 0x3) << 3) | ((LogDevId.VendorId >> 13) & 0x7)) + 'A' - 1, + LogDevice->VendorId[2] = ((LogDevId.VendorId >> 8) & 0x1f) + 'A' - 1, + LogDevice->ProdId = RtlUshortByteSwap(LogDevId.ProdId); + LogDevice->SerialNumber = Identifier.Serial; + LogDevice->IoAddr = ReadIoBase(FdoExt->ReadDataPort, 0); + LogDevice->IrqNo = ReadIrqNo(FdoExt->ReadDataPort, 0); - DPRINT1("Detected ISA PnP device - VID: '%3s' PID: 0x%x SN: 0x%08x IoBase: 0x%x IRQ:0x%x\n", - LogDevice->VendorId, LogDevice->ProdId, LogDevice->SerialNumber, LogDevice->IoAddr, LogDevice->IrqNo); + DPRINT1("Detected ISA PnP device - VID: '%3s' PID: 0x%x SN: 0x%08x IoBase: 0x%x IRQ:0x%x\n", + LogDevice->VendorId, LogDevice->ProdId, LogDevice->SerialNumber, LogDevice->IoAddr, LogDevice->IrqNo); - WaitForKey(); + WaitForKey(); - InsertTailList(&FdoExt->DeviceListHead, &LogDevice->ListEntry); - FdoExt->DeviceCount++; + InsertTailList(&FdoExt->DeviceListHead, &LogDevice->ListEntry); + FdoExt->DeviceCount++; + } } - } - return STATUS_SUCCESS; + return STATUS_SUCCESS; } NTSTATUS @@ -522,16 +560,16 @@ NTAPI IsaHwDetectReadDataPort( IN PISAPNP_FDO_EXTENSION FdoExt) { - FdoExt->ReadDataPort = Isolate(); - if (!FdoExt->ReadDataPort) - { - DPRINT1("No read data port found\n"); - return STATUS_UNSUCCESSFUL; - } + FdoExt->ReadDataPort = Isolate(); + if (!FdoExt->ReadDataPort) + { + DPRINT1("No read data port found\n"); + return STATUS_UNSUCCESSFUL; + } - DPRINT1("Detected read data port at 0x%p\n", FdoExt->ReadDataPort); + DPRINT1("Detected read data port at 0x%p\n", FdoExt->ReadDataPort); - return STATUS_SUCCESS; + return STATUS_SUCCESS; } NTSTATUS @@ -548,18 +586,18 @@ IsaHwActivateDevice( NTSTATUS NTAPI IsaHwDeactivateDevice( - IN PISAPNP_LOGICAL_DEVICE LogicalDevice) + IN PISAPNP_LOGICAL_DEVICE LogicalDevice) { - DeviceActivation(LogicalDevice, - FALSE); + DeviceActivation(LogicalDevice, + FALSE); - return STATUS_SUCCESS; + return STATUS_SUCCESS; } NTSTATUS NTAPI IsaHwFillDeviceList( - IN PISAPNP_FDO_EXTENSION FdoExt) + IN PISAPNP_FDO_EXTENSION FdoExt) { - return ProbeIsaPnpBus(FdoExt); + return ProbeIsaPnpBus(FdoExt); } diff --git a/drivers/bus/isapnp/isapnp.c b/drivers/bus/isapnp/isapnp.c index eebe03c29aa..d3d600a75d3 100644 --- a/drivers/bus/isapnp/isapnp.c +++ b/drivers/bus/isapnp/isapnp.c @@ -16,42 +16,41 @@ static NTSTATUS NTAPI ForwardIrpCompletion( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PVOID Context) + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context) { + UNREFERENCED_PARAMETER(DeviceObject); - UNREFERENCED_PARAMETER(DeviceObject); + if (Irp->PendingReturned) + KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE); - if (Irp->PendingReturned) - KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE); - - return STATUS_MORE_PROCESSING_REQUIRED; + return STATUS_MORE_PROCESSING_REQUIRED; } NTSTATUS NTAPI IsaForwardIrpSynchronous( - IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp) + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp) { - KEVENT Event; - NTSTATUS Status; + KEVENT Event; + NTSTATUS Status; - KeInitializeEvent(&Event, NotificationEvent, FALSE); - IoCopyCurrentIrpStackLocationToNext(Irp); + KeInitializeEvent(&Event, NotificationEvent, FALSE); + IoCopyCurrentIrpStackLocationToNext(Irp); - IoSetCompletionRoutine(Irp, ForwardIrpCompletion, &Event, TRUE, TRUE, TRUE); + IoSetCompletionRoutine(Irp, ForwardIrpCompletion, &Event, TRUE, TRUE, TRUE); - Status = IoCallDriver(FdoExt->Ldo, Irp); - if (Status == STATUS_PENDING) - { - Status = KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); - if (NT_SUCCESS(Status)) - Status = Irp->IoStatus.Status; - } + Status = IoCallDriver(FdoExt->Ldo, Irp); + if (Status == STATUS_PENDING) + { + Status = KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); + if (NT_SUCCESS(Status)) + Status = Irp->IoStatus.Status; + } - return Status; + return Status; } static DRIVER_DISPATCH IsaCreateClose; @@ -60,17 +59,17 @@ static NTSTATUS NTAPI IsaCreateClose( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { - Irp->IoStatus.Status = STATUS_SUCCESS; - Irp->IoStatus.Information = FILE_OPENED; + Irp->IoStatus.Status = STATUS_SUCCESS; + Irp->IoStatus.Information = FILE_OPENED; - DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); + DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); - IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_SUCCESS; + return STATUS_SUCCESS; } static DRIVER_DISPATCH IsaIoctl; @@ -79,26 +78,26 @@ static NTSTATUS NTAPI IsaIoctl( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { - PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); - NTSTATUS Status; + PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); + NTSTATUS Status; - DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); + DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); - switch (IrpSp->Parameters.DeviceIoControl.IoControlCode) - { - default: - DPRINT1("Unknown ioctl code: %x\n", IrpSp->Parameters.DeviceIoControl.IoControlCode); - Status = STATUS_NOT_SUPPORTED; - break; - } + switch (IrpSp->Parameters.DeviceIoControl.IoControlCode) + { + default: + DPRINT1("Unknown ioctl code: %x\n", IrpSp->Parameters.DeviceIoControl.IoControlCode); + Status = STATUS_NOT_SUPPORTED; + break; + } - Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); - return Status; + return Status; } static DRIVER_DISPATCH IsaReadWrite; @@ -107,62 +106,62 @@ static NTSTATUS NTAPI IsaReadWrite( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { - DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); + DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); - Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; - Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + Irp->IoStatus.Information = 0; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + IoCompleteRequest(Irp, IO_NO_INCREMENT); - return STATUS_NOT_SUPPORTED; + return STATUS_NOT_SUPPORTED; } static NTSTATUS NTAPI IsaAddDevice( - IN PDRIVER_OBJECT DriverObject, - IN PDEVICE_OBJECT PhysicalDeviceObject) + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT PhysicalDeviceObject) { - PDEVICE_OBJECT Fdo; - PISAPNP_FDO_EXTENSION FdoExt; - NTSTATUS Status; - - DPRINT("%s(%p, %p)\n", __FUNCTION__, DriverObject, PhysicalDeviceObject); - - Status = IoCreateDevice(DriverObject, - sizeof(*FdoExt), - NULL, - FILE_DEVICE_BUS_EXTENDER, - FILE_DEVICE_SECURE_OPEN, - TRUE, - &Fdo); - if (!NT_SUCCESS(Status)) - { - DPRINT1("Failed to create FDO (0x%x)\n", Status); - return Status; - } - - FdoExt = Fdo->DeviceExtension; - RtlZeroMemory(FdoExt, sizeof(*FdoExt)); - - FdoExt->Common.Self = Fdo; - FdoExt->Common.IsFdo = TRUE; - FdoExt->Common.State = dsStopped; - FdoExt->DriverObject = DriverObject; - FdoExt->Pdo = PhysicalDeviceObject; - FdoExt->Ldo = IoAttachDeviceToDeviceStack(Fdo, - PhysicalDeviceObject); - - InitializeListHead(&FdoExt->DeviceListHead); - KeInitializeSpinLock(&FdoExt->Lock); - - Fdo->Flags &= ~DO_DEVICE_INITIALIZING; - - return STATUS_SUCCESS; + PDEVICE_OBJECT Fdo; + PISAPNP_FDO_EXTENSION FdoExt; + NTSTATUS Status; + + DPRINT("%s(%p, %p)\n", __FUNCTION__, DriverObject, PhysicalDeviceObject); + + Status = IoCreateDevice(DriverObject, + sizeof(*FdoExt), + NULL, + FILE_DEVICE_BUS_EXTENDER, + FILE_DEVICE_SECURE_OPEN, + TRUE, + &Fdo); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to create FDO (0x%x)\n", Status); + return Status; + } + + FdoExt = Fdo->DeviceExtension; + RtlZeroMemory(FdoExt, sizeof(*FdoExt)); + + FdoExt->Common.Self = Fdo; + FdoExt->Common.IsFdo = TRUE; + FdoExt->Common.State = dsStopped; + FdoExt->DriverObject = DriverObject; + FdoExt->Pdo = PhysicalDeviceObject; + FdoExt->Ldo = IoAttachDeviceToDeviceStack(Fdo, + PhysicalDeviceObject); + + InitializeListHead(&FdoExt->DeviceListHead); + KeInitializeSpinLock(&FdoExt->Lock); + + Fdo->Flags &= ~DO_DEVICE_INITIALIZING; + + return STATUS_SUCCESS; } static DRIVER_DISPATCH IsaPnp; @@ -171,45 +170,45 @@ static NTSTATUS NTAPI IsaPnp( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp) + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) { - PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); - PISAPNP_COMMON_EXTENSION DevExt = DeviceObject->DeviceExtension; - - DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); - - if (DevExt->IsFdo) - { - return IsaFdoPnp((PISAPNP_FDO_EXTENSION)DevExt, - Irp, - IrpSp); - } - else - { - return IsaPdoPnp((PISAPNP_PDO_EXTENSION)DevExt, - Irp, - IrpSp); - } + PIO_STACK_LOCATION IrpSp = IoGetCurrentIrpStackLocation(Irp); + PISAPNP_COMMON_EXTENSION DevExt = DeviceObject->DeviceExtension; + + DPRINT("%s(%p, %p)\n", __FUNCTION__, DeviceObject, Irp); + + if (DevExt->IsFdo) + { + return IsaFdoPnp((PISAPNP_FDO_EXTENSION)DevExt, + Irp, + IrpSp); + } + else + { + return IsaPdoPnp((PISAPNP_PDO_EXTENSION)DevExt, + Irp, + IrpSp); + } } NTSTATUS NTAPI DriverEntry( - IN PDRIVER_OBJECT DriverObject, - IN PUNICODE_STRING RegistryPath) + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath) { - DPRINT("%s(%p, %wZ)\n", __FUNCTION__, DriverObject, RegistryPath); + DPRINT("%s(%p, %wZ)\n", __FUNCTION__, DriverObject, RegistryPath); - DriverObject->MajorFunction[IRP_MJ_CREATE] = IsaCreateClose; - DriverObject->MajorFunction[IRP_MJ_CLOSE] = IsaCreateClose; - DriverObject->MajorFunction[IRP_MJ_READ] = IsaReadWrite; - DriverObject->MajorFunction[IRP_MJ_WRITE] = IsaReadWrite; - DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = IsaIoctl; - DriverObject->MajorFunction[IRP_MJ_PNP] = IsaPnp; - DriverObject->DriverExtension->AddDevice = IsaAddDevice; + DriverObject->MajorFunction[IRP_MJ_CREATE] = IsaCreateClose; + DriverObject->MajorFunction[IRP_MJ_CLOSE] = IsaCreateClose; + DriverObject->MajorFunction[IRP_MJ_READ] = IsaReadWrite; + DriverObject->MajorFunction[IRP_MJ_WRITE] = IsaReadWrite; + DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = IsaIoctl; + DriverObject->MajorFunction[IRP_MJ_PNP] = IsaPnp; + DriverObject->DriverExtension->AddDevice = IsaAddDevice; - return STATUS_SUCCESS; + return STATUS_SUCCESS; } /* EOF */ diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h index c941712f77a..633341d5f99 100644 --- a/drivers/bus/isapnp/isapnp.h +++ b/drivers/bus/isapnp/isapnp.h @@ -11,42 +11,42 @@ extern "C" { #define TAG_ISAPNP 'PNPI' typedef enum { - dsStopped, - dsStarted + dsStopped, + dsStarted } ISAPNP_DEVICE_STATE; typedef struct _ISAPNP_LOGICAL_DEVICE { - PDEVICE_OBJECT Pdo; - UCHAR VendorId[3]; - USHORT ProdId; - ULONG SerialNumber; - USHORT IoAddr; - UCHAR IrqNo; - UCHAR CSN; - UCHAR LDN; - LIST_ENTRY ListEntry; + PDEVICE_OBJECT Pdo; + UCHAR VendorId[3]; + USHORT ProdId; + ULONG SerialNumber; + USHORT IoAddr; + UCHAR IrqNo; + UCHAR CSN; + UCHAR LDN; + LIST_ENTRY ListEntry; } ISAPNP_LOGICAL_DEVICE, *PISAPNP_LOGICAL_DEVICE; typedef struct _ISAPNP_COMMON_EXTENSION { - PDEVICE_OBJECT Self; - BOOLEAN IsFdo; - ISAPNP_DEVICE_STATE State; + PDEVICE_OBJECT Self; + BOOLEAN IsFdo; + ISAPNP_DEVICE_STATE State; } ISAPNP_COMMON_EXTENSION, *PISAPNP_COMMON_EXTENSION; typedef struct _ISAPNP_FDO_EXTENSION { - ISAPNP_COMMON_EXTENSION Common; - PDEVICE_OBJECT Ldo; - PDEVICE_OBJECT Pdo; - LIST_ENTRY DeviceListHead; - ULONG DeviceCount; - PDRIVER_OBJECT DriverObject; - PUCHAR ReadDataPort; - KSPIN_LOCK Lock; + ISAPNP_COMMON_EXTENSION Common; + PDEVICE_OBJECT Ldo; + PDEVICE_OBJECT Pdo; + LIST_ENTRY DeviceListHead; + ULONG DeviceCount; + PDRIVER_OBJECT DriverObject; + PUCHAR ReadDataPort; + KSPIN_LOCK Lock; } ISAPNP_FDO_EXTENSION, *PISAPNP_FDO_EXTENSION; typedef struct _ISAPNP_PDO_EXTENSION { - ISAPNP_COMMON_EXTENSION Common; - PISAPNP_LOGICAL_DEVICE IsaPnpDevice; + ISAPNP_COMMON_EXTENSION Common; + PISAPNP_LOGICAL_DEVICE IsaPnpDevice; } ISAPNP_PDO_EXTENSION, *PISAPNP_PDO_EXTENSION; /* isapnp.c */ @@ -56,51 +56,51 @@ DRIVER_INITIALIZE DriverEntry; NTSTATUS NTAPI DriverEntry( - IN PDRIVER_OBJECT DriverObject, - IN PUNICODE_STRING RegistryPath); + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath); NTSTATUS NTAPI IsaForwardIrpSynchronous( - IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp); + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp); /* fdo.c */ NTSTATUS NTAPI IsaFdoPnp( - IN PISAPNP_FDO_EXTENSION FdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp); + IN PISAPNP_FDO_EXTENSION FdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp); /* pdo.c */ NTSTATUS NTAPI IsaPdoPnp( - IN PISAPNP_PDO_EXTENSION PdoDeviceExtension, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp); + IN PISAPNP_PDO_EXTENSION PdoDeviceExtension, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp); /* hardware.c */ NTSTATUS NTAPI IsaHwDetectReadDataPort( - IN PISAPNP_FDO_EXTENSION FdoExt); + IN PISAPNP_FDO_EXTENSION FdoExt); NTSTATUS NTAPI IsaHwFillDeviceList( - IN PISAPNP_FDO_EXTENSION FdoExt); + IN PISAPNP_FDO_EXTENSION FdoExt); NTSTATUS NTAPI IsaHwDeactivateDevice( - IN PISAPNP_LOGICAL_DEVICE LogicalDevice); + IN PISAPNP_LOGICAL_DEVICE LogicalDevice); NTSTATUS NTAPI IsaHwActivateDevice( - IN PISAPNP_LOGICAL_DEVICE LogicalDevice); + IN PISAPNP_LOGICAL_DEVICE LogicalDevice); #ifdef __cplusplus } diff --git a/drivers/bus/isapnp/isapnphw.h b/drivers/bus/isapnp/isapnphw.h index aec87191fe5..eeef89951f0 100644 --- a/drivers/bus/isapnp/isapnphw.h +++ b/drivers/bus/isapnp/isapnphw.h @@ -83,22 +83,22 @@ extern "C" { #define ISAPNP_TAG_PSEUDO_NEWBOARD 0x100 typedef struct _ISAPNP_IDENTIFIER { - USHORT VendorId; - USHORT ProdId; - ULONG Serial; - UCHAR Checksum; + USHORT VendorId; + USHORT ProdId; + ULONG Serial; + UCHAR Checksum; } ISAPNP_IDENTIFIER, *PISAPNP_IDENTIFIER; typedef struct _ISAPNP_LOGDEVID { - USHORT VendorId; - USHORT ProdId; - USHORT Flags; + USHORT VendorId; + USHORT ProdId; + USHORT Flags; } ISAPNP_LOGDEVID, *PISAPNP_LOGDEVID; typedef struct _ISAPNP_DEVICEID { - CHAR* Name; - USHORT VendorId; - USHORT ProdId; + CHAR* Name; + USHORT VendorId; + USHORT ProdId; } ISAPNP_DEVICEID, *PISAPNP_DEVICEID; #ifdef __cplusplus diff --git a/drivers/bus/isapnp/pdo.c b/drivers/bus/isapnp/pdo.c index 6e06af29241..c77a2bb173b 100644 --- a/drivers/bus/isapnp/pdo.c +++ b/drivers/bus/isapnp/pdo.c @@ -13,184 +13,184 @@ NTSTATUS NTAPI IsaPdoQueryDeviceRelations( - IN PISAPNP_PDO_EXTENSION PdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp) + IN PISAPNP_PDO_EXTENSION PdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) { - PDEVICE_RELATIONS DeviceRelations; + PDEVICE_RELATIONS DeviceRelations; - if (IrpSp->Parameters.QueryDeviceRelations.Type != TargetDeviceRelation) - return Irp->IoStatus.Status; + if (IrpSp->Parameters.QueryDeviceRelations.Type != TargetDeviceRelation) + return Irp->IoStatus.Status; - DeviceRelations = ExAllocatePool(PagedPool, sizeof(*DeviceRelations)); - if (!DeviceRelations) - return STATUS_INSUFFICIENT_RESOURCES; + DeviceRelations = ExAllocatePool(PagedPool, sizeof(*DeviceRelations)); + if (!DeviceRelations) + return STATUS_INSUFFICIENT_RESOURCES; - DeviceRelations->Count = 1; - DeviceRelations->Objects[0] = PdoExt->Common.Self; - ObReferenceObject(PdoExt->Common.Self); + DeviceRelations->Count = 1; + DeviceRelations->Objects[0] = PdoExt->Common.Self; + ObReferenceObject(PdoExt->Common.Self); - Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; + Irp->IoStatus.Information = (ULONG_PTR)DeviceRelations; - return STATUS_SUCCESS; + return STATUS_SUCCESS; } NTSTATUS NTAPI IsaPdoQueryCapabilities( - IN PISAPNP_PDO_EXTENSION PdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp) + IN PISAPNP_PDO_EXTENSION PdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) { - PDEVICE_CAPABILITIES DeviceCapabilities; - PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice; + PDEVICE_CAPABILITIES DeviceCapabilities; + PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice; - DeviceCapabilities = IrpSp->Parameters.DeviceCapabilities.Capabilities; - if (DeviceCapabilities->Version != 1) - return STATUS_UNSUCCESSFUL; + DeviceCapabilities = IrpSp->Parameters.DeviceCapabilities.Capabilities; + if (DeviceCapabilities->Version != 1) + return STATUS_UNSUCCESSFUL; - DeviceCapabilities->UniqueID = LogDev->SerialNumber != 0xffffffff; - DeviceCapabilities->Address = LogDev->CSN; + DeviceCapabilities->UniqueID = LogDev->SerialNumber != 0xffffffff; + DeviceCapabilities->Address = LogDev->CSN; - return STATUS_SUCCESS; + return STATUS_SUCCESS; } NTSTATUS NTAPI IsaPdoQueryId( - IN PISAPNP_PDO_EXTENSION PdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp) + IN PISAPNP_PDO_EXTENSION PdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) { - PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice; - WCHAR Temp[256]; - PWCHAR Buffer, End; - ULONG Length; - NTSTATUS Status; - - switch (IrpSp->Parameters.QueryId.IdType) - { - case BusQueryDeviceID: + PISAPNP_LOGICAL_DEVICE LogDev = PdoExt->IsaPnpDevice; + WCHAR Temp[256]; + PWCHAR Buffer, End; + ULONG Length; + NTSTATUS Status; + + switch (IrpSp->Parameters.QueryId.IdType) { - DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n"); - Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), - &End, - NULL, 0, - L"ISAPNP\\%3S%04X", - LogDev->VendorId, - LogDev->ProdId); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; - break; + case BusQueryDeviceID: + { + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryDeviceID\n"); + Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), + &End, + NULL, 0, + L"ISAPNP\\%3S%04X", + LogDev->VendorId, + LogDev->ProdId); + if (!NT_SUCCESS(Status)) + return Status; + Length = End - Temp; + Temp[Length++] = UNICODE_NULL; + break; + } + + case BusQueryHardwareIDs: + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); + Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), + &End, + NULL, 0, + L"ISAPNP\\%3S%04X", + LogDev->VendorId, + LogDev->ProdId); + if (!NT_SUCCESS(Status)) + return Status; + Length = End - Temp; + Temp[Length++] = UNICODE_NULL; + Status = RtlStringCbPrintfExW(Temp + Length, sizeof(Temp) - Length, + &End, + NULL, 0, + L"*%3S%04X", + LogDev->VendorId, + LogDev->ProdId); + if (!NT_SUCCESS(Status)) + return Status; + Length = End - Temp; + Temp[Length++] = UNICODE_NULL; + Temp[Length++] = UNICODE_NULL; + break; + + case BusQueryInstanceID: + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); + Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), + &End, + NULL, 0, + L"%X", + LogDev->SerialNumber); + if (!NT_SUCCESS(Status)) + return Status; + Length = End - Temp; + Temp[Length++] = UNICODE_NULL; + break; + + default: + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", + IrpSp->Parameters.QueryId.IdType); + return Irp->IoStatus.Status; } - case BusQueryHardwareIDs: - DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryHardwareIDs\n"); - Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), - &End, - NULL, 0, - L"ISAPNP\\%3S%04X", - LogDev->VendorId, - LogDev->ProdId); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; - Status = RtlStringCbPrintfExW(Temp + Length, sizeof(Temp) - Length, - &End, - NULL, 0, - L"*%3S%04X", - LogDev->VendorId, - LogDev->ProdId); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; - Temp[Length++] = UNICODE_NULL; - break; - - case BusQueryInstanceID: - DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); - Status = RtlStringCbPrintfExW(Temp, sizeof(Temp), - &End, - NULL, 0, - L"%X", - LogDev->SerialNumber); - if (!NT_SUCCESS(Status)) - return Status; - Length = End - Temp; - Temp[Length++] = UNICODE_NULL; - break; - - default: - DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", - IrpSp->Parameters.QueryId.IdType); - return Irp->IoStatus.Status; - } - - Buffer = ExAllocatePool(PagedPool, Length * sizeof(WCHAR)); - if (!Buffer) - return STATUS_NO_MEMORY; - - RtlCopyMemory(Buffer, Temp, Length * sizeof(WCHAR)); - Irp->IoStatus.Information = (ULONG_PTR)Buffer; - return STATUS_SUCCESS; + Buffer = ExAllocatePool(PagedPool, Length * sizeof(WCHAR)); + if (!Buffer) + return STATUS_NO_MEMORY; + + RtlCopyMemory(Buffer, Temp, Length * sizeof(WCHAR)); + Irp->IoStatus.Information = (ULONG_PTR)Buffer; + return STATUS_SUCCESS; } NTSTATUS NTAPI IsaPdoPnp( - IN PISAPNP_PDO_EXTENSION PdoExt, - IN PIRP Irp, - IN PIO_STACK_LOCATION IrpSp) + IN PISAPNP_PDO_EXTENSION PdoExt, + IN PIRP Irp, + IN PIO_STACK_LOCATION IrpSp) { - NTSTATUS Status = Irp->IoStatus.Status; + NTSTATUS Status = Irp->IoStatus.Status; - switch (IrpSp->MinorFunction) - { - case IRP_MN_START_DEVICE: - Status = IsaHwActivateDevice(PdoExt->IsaPnpDevice); + switch (IrpSp->MinorFunction) + { + case IRP_MN_START_DEVICE: + Status = IsaHwActivateDevice(PdoExt->IsaPnpDevice); - if (NT_SUCCESS(Status)) - PdoExt->Common.State = dsStarted; - break; + if (NT_SUCCESS(Status)) + PdoExt->Common.State = dsStarted; + break; - case IRP_MN_STOP_DEVICE: - Status = IsaHwDeactivateDevice(PdoExt->IsaPnpDevice); + case IRP_MN_STOP_DEVICE: + Status = IsaHwDeactivateDevice(PdoExt->IsaPnpDevice); - if (NT_SUCCESS(Status)) - PdoExt->Common.State = dsStopped; - break; + if (NT_SUCCESS(Status)) + PdoExt->Common.State = dsStopped; + break; - case IRP_MN_QUERY_DEVICE_RELATIONS: - Status = IsaPdoQueryDeviceRelations(PdoExt, Irp, IrpSp); - break; + case IRP_MN_QUERY_DEVICE_RELATIONS: + Status = IsaPdoQueryDeviceRelations(PdoExt, Irp, IrpSp); + break; - case IRP_MN_QUERY_CAPABILITIES: - Status = IsaPdoQueryCapabilities(PdoExt, Irp, IrpSp); - break; + case IRP_MN_QUERY_CAPABILITIES: + Status = IsaPdoQueryCapabilities(PdoExt, Irp, IrpSp); + break; - case IRP_MN_QUERY_RESOURCES: - DPRINT1("IRP_MN_QUERY_RESOURCES is UNIMPLEMENTED!\n"); - break; + case IRP_MN_QUERY_RESOURCES: + DPRINT1("IRP_MN_QUERY_RESOURCES is UNIMPLEMENTED!\n"); + break; - case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: - DPRINT1("IRP_MN_QUERY_RESOURCE_REQUIREMENTS is UNIMPLEMENTED!\n"); - break; + case IRP_MN_QUERY_RESOURCE_REQUIREMENTS: + DPRINT1("IRP_MN_QUERY_RESOURCE_REQUIREMENTS is UNIMPLEMENTED!\n"); + break; - case IRP_MN_QUERY_ID: - Status = IsaPdoQueryId(PdoExt, Irp, IrpSp); - break; + case IRP_MN_QUERY_ID: + Status = IsaPdoQueryId(PdoExt, Irp, IrpSp); + break; - default: - DPRINT1("Unknown PnP code: %x\n", IrpSp->MinorFunction); - break; - } + default: + DPRINT1("Unknown PnP code: %x\n", IrpSp->MinorFunction); + break; + } - Irp->IoStatus.Status = Status; - IoCompleteRequest(Irp, IO_NO_INCREMENT); + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); - return Status; + return Status; }
4 years, 9 months
1
0
0
0
[reactos] 01/01: [GDI32_WINETEST][USER32_WINETEST] Remove forced WINVER defines (#2455)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a8dbe6805a866cffdb1ef…
commit a8dbe6805a866cffdb1ef67d1e3cb97ea9594c51 Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Fri Mar 20 19:20:52 2020 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Mar 20 19:20:52 2020 +0100 [GDI32_WINETEST][USER32_WINETEST] Remove forced WINVER defines (#2455) No impact, as already deactivated. Import
https://source.winehq.org/git/wine.git/commit/d0fd12b90946865a92f3fd016ccac…
--- modules/rostests/winetests/gdi32/dc.c | 3 --- modules/rostests/winetests/user32/dialog.c | 4 ---- modules/rostests/winetests/user32/msg.c | 5 ----- modules/rostests/winetests/user32/sysparams.c | 6 ------ 4 files changed, 18 deletions(-) diff --git a/modules/rostests/winetests/gdi32/dc.c b/modules/rostests/winetests/gdi32/dc.c index 8abfe53099f..293728416de 100644 --- a/modules/rostests/winetests/gdi32/dc.c +++ b/modules/rostests/winetests/gdi32/dc.c @@ -19,9 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __REACTOS__ -#define WINVER 0x0501 /* request latest DEVMODE */ -#endif #define NONAMELESSSTRUCT #define NONAMELESSUNION diff --git a/modules/rostests/winetests/user32/dialog.c b/modules/rostests/winetests/user32/dialog.c index 3360b688bff..812cbfaa5c6 100644 --- a/modules/rostests/winetests/user32/dialog.c +++ b/modules/rostests/winetests/user32/dialog.c @@ -29,10 +29,6 @@ * normally be met. */ -#ifndef __REACTOS__ -#define WINVER 0x0600 /* For NONCLIENTMETRICS with padding */ -#endif - #include <assert.h> #include <stdio.h> #include <stdarg.h> diff --git a/modules/rostests/winetests/user32/msg.c b/modules/rostests/winetests/user32/msg.c index 7df4ba021db..ecc63baf6f7 100644 --- a/modules/rostests/winetests/user32/msg.c +++ b/modules/rostests/winetests/user32/msg.c @@ -20,11 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __REACTOS__ -#define _WIN32_WINNT 0x0600 /* For WM_CHANGEUISTATE,QS_RAWINPUT,WM_DWMxxxx */ -#define WINVER 0x0600 /* for WM_GETTITLEBARINFOEX */ -#endif - #include <assert.h> #include <limits.h> #include <stdarg.h> diff --git a/modules/rostests/winetests/user32/sysparams.c b/modules/rostests/winetests/user32/sysparams.c index bd107891279..6f8e66f2868 100644 --- a/modules/rostests/winetests/user32/sysparams.c +++ b/modules/rostests/winetests/user32/sysparams.c @@ -17,12 +17,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef __REACTOS__ -#define _WIN32_WINNT 0x0600 /* For SPI_GETMOUSEHOVERWIDTH and more */ -#define _WIN32_IE 0x0700 -#define WINVER 0x0600 /* For COLOR_MENUBAR, NONCLIENTMETRICS with padding */ -#endif - #include <assert.h> #include <stdlib.h> #include <stdarg.h>
4 years, 9 months
1
0
0
0
[reactos] 01/01: [TRANSLATION] Update Hungarian translation of usetup, syssetup, explorer, netshell, userenv, shortcuts (#2442)
by Tibor Lajos Füzi
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=432a5ddc7fa22c2132bdf…
commit 432a5ddc7fa22c2132bdf784220addf8c388a5bc Author: Tibor Lajos Füzi <tibor.fuzi(a)gmail.com> AuthorDate: Fri Mar 20 17:52:46 2020 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Fri Mar 20 17:52:46 2020 +0100 [TRANSLATION] Update Hungarian translation of usetup, syssetup, explorer, netshell, userenv, shortcuts (#2442) --- base/setup/usetup/lang/hu-HU.h | 2 +- base/shell/explorer/lang/hu-HU.rc | 4 +- dll/shellext/netshell/lang/hu-HU.rc | 164 +++++++++++++++++----------------- dll/win32/syssetup/lang/hu-HU.rc | 26 +++--- dll/win32/userenv/lang/hu-HU.rc | 2 +- media/inf/shortcuts.inf | 109 +++++++++++----------- modules/rosapps/rosapps_shortcuts.inf | 22 ++--- 7 files changed, 168 insertions(+), 161 deletions(-) diff --git a/base/setup/usetup/lang/hu-HU.h b/base/setup/usetup/lang/hu-HU.h index c70abf6bd58..b15823a72bb 100644 --- a/base/setup/usetup/lang/hu-HU.h +++ b/base/setup/usetup/lang/hu-HU.h @@ -1204,7 +1204,7 @@ static MUI_ENTRY huHUFormatPartitionEntries[] = { 6, 10, - "A telep\241t\213 most form\240zni fogja a part\241ci\242t. Nyomjon ENTER-t a folytat\240shoz.", + "A telep\241t\213 form\240zni fogja a part\241ci\242t. Nyomjon ENTER-t a folytat\240shoz.", TEXT_STYLE_NORMAL, TEXT_ID_FORMAT_PROMPT }, diff --git a/base/shell/explorer/lang/hu-HU.rc b/base/shell/explorer/lang/hu-HU.rc index b84063c6068..4ed7ff57c4a 100644 --- a/base/shell/explorer/lang/hu-HU.rc +++ b/base/shell/explorer/lang/hu-HU.rc @@ -74,10 +74,10 @@ BEGIN GROUPBOX "Értesítési terület", IDC_STATIC, 6, 114, 240, 98 CONTROL "", IDC_TASKBARPROP_NOTIFICATIONBITMAP, "Static", SS_BITMAP | SS_SUNKEN | SS_CENTERIMAGE, 12, 126, 229, 24 AUTOCHECKBOX "Az óra &megjelenítése", IDC_TASKBARPROP_CLOCK, 13, 153, 80, 10 - AUTOCHECKBOX "Má&sodpercek megjelenítése", IDC_TASKBARPROP_SECONDS, 120, 153, 80, 10, WS_DISABLED + AUTOCHECKBOX "Má&sodpercek megjelenítése", IDC_TASKBARPROP_SECONDS, 120, 153, 100, 10, WS_DISABLED LTEXT "Rendezettebbé teheti az értesítési területet, ha elrejti azokat az ikonokat, amelyekre már régen nem kattintott rá.", IDC_STATIC, 13, 169, 223, 16 AUTOCHECKBOX "A nem aktív &ikonok elrejtése", IDC_TASKBARPROP_HIDEICONS, 13, 191, 125, 10 - PUSHBUTTON "&Testreszabás...", IDC_TASKBARPROP_ICONCUST, 188, 191, 50, 14 + PUSHBUTTON "&Testreszabás...", IDC_TASKBARPROP_ICONCUST, 188, 188, 53, 14 END IDD_TASKBARPROP_STARTMENU DIALOGEX 0, 0, 252, 218 diff --git a/dll/shellext/netshell/lang/hu-HU.rc b/dll/shellext/netshell/lang/hu-HU.rc index 35dfc3f61b7..75a6d8786e8 100644 --- a/dll/shellext/netshell/lang/hu-HU.rc +++ b/dll/shellext/netshell/lang/hu-HU.rc @@ -6,22 +6,22 @@ CAPTION "Általános" FONT 8, "MS Shell Dlg" BEGIN CONTROL "", IDC_COMPONENTSLIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 9, 71, 230, 55 - LTEXT "Kapcsolódás mivel:", -1, 9, 9, 217, 8 + LTEXT "Kapcsolódás ezzel:", -1, 9, 9, 217, 8 EDITTEXT IDC_NETCARDNAME, 9, 21, 230, 12, WS_BORDER | WS_TABSTOP | ES_READONLY PUSHBUTTON "&Beállítás", IDC_CONFIGURE, 189, 38, 50, 14 - LTEXT "A megjelölt alkotóelemek vannak használatban ennél a kapcsolatnál:", -1, 9, 59, 217, 8 + LTEXT "Ez a kapcsolat a következő elemeket használja:", -1, 9, 59, 217, 8 PUSHBUTTON "&Telepítés", IDC_INSTALL, 9, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Eltávolítás", IDC_UNINSTALL, 90, 130, 65, 14, WS_DISABLED | WS_TABSTOP PUSHBUTTON "&Tulajdonságok", IDC_PROPERTIES, 174, 130, 65, 14 GROUPBOX "Leírás", -1, 9, 153, 230, 46, BS_GROUPBOX LTEXT "Alkotóelem leírása ide kerül...", IDC_DESCRIPTION, 15, 165, 217, 28, WS_GROUP AUTOCHECKBOX "Ikon megjelenítése a tálcán a kapcsolat ideje alatt", IDC_SHOWTASKBAR, 9, 206, 230, 12, WS_TABSTOP - AUTOCHECKBOX "&Notify me when this connection has limited or no connectivity", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 20, BS_MULTILINE | BS_TOP | WS_TABSTOP + AUTOCHECKBOX "&Értesítsen amikor a kapcsolat korlátozott vagy nem elérhető", IDC_NOTIFYNOCONNECTION, 9, 220, 230, 20, BS_MULTILINE | BS_TOP | WS_TABSTOP END IDD_STATUS DIALOGEX 0, 0, 200, 280 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | DS_MODALFRAME | WS_SYSMENU -CAPTION "Allgemein" +CAPTION "Általános" FONT 8, "MS Shell Dlg" BEGIN END @@ -33,13 +33,13 @@ FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Kapcsolat", -1, 9, 8, 182, 58, BS_GROUPBOX LTEXT "Állapot:", -1, 19, 20, 60, 8 - LTEXT "Idõtartam:", -1, 19, 34, 60, 8 + LTEXT "Időtartam:", -1, 19, 34, 60, 8 LTEXT "Sebesség:", -1, 19, 48, 60, 8 GROUPBOX "Tevékenység", -1, 9, 74, 182, 70, BS_GROUPBOX RTEXT "Elküldött", -1, 26, 90, 60, 8 ICON "", IDC_NETSTAT, 110, 85, 32, 32 LTEXT "Beérkezett", -1, 149, 90, 37, 8 - LTEXT "Bytes:", -1, 17, 115, 32, 8 + LTEXT "Byte-ok:", -1, 17, 115, 32, 8 RTEXT "000.000.000", IDC_SEND, 63, 115, 44, 8 RTEXT "000.000.000", IDC_RECEIVED, 139, 115, 44, 8 PUSHBUTTON "&Tulajdonságok", IDC_STATUS_PROPERTIES, 10, 150, 50, 14 @@ -51,126 +51,126 @@ END IDD_LAN_NETSTATUSADVANCED DIALOGEX 0, 0, 200, 180 STYLE DS_SHELLFONT | WS_CHILD | WS_DISABLED | WS_CAPTION -CAPTION "Support" +CAPTION "Támogatás" FONT 8, "MS Shell Dlg" BEGIN - GROUPBOX "Connection Status", -1, 9, 8, 190, 88, BS_GROUPBOX - LTEXT "Address type:", -1, 22, 20, 80, 8 - LTEXT "IP Address:", -1, 22, 34, 80, 8 - LTEXT "Subnet Mask:", -1, 22, 48, 80, 8 - LTEXT "Default Gateway:", -1, 22, 62, 80, 8 + GROUPBOX "Kapcsolat állapota", -1, 9, 8, 190, 88, BS_GROUPBOX + LTEXT "Cím típusa:", -1, 22, 20, 80, 8 + LTEXT "IP-cím:", -1, 22, 34, 80, 8 + LTEXT "Alhálózati maszk:", -1, 22, 48, 80, 8 + LTEXT "Alapértelmezett átjáró:", -1, 22, 62, 80, 8 RTEXT "N/A", IDC_DETAILSTYPE, 112, 20, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSIP, 112, 34, 80, 8 RTEXT "000.000.000.000", IDC_DETAILSSUBNET, 112, 48, 80, 8 RTEXT "", IDC_DETAILSGATEWAY, 112, 62, 80, 8 - PUSHBUTTON "&Details...", IDC_DETAILS, 22, 76, 62, 14 + PUSHBUTTON "&Részletek...", IDC_DETAILS, 22, 76, 62, 14 END IDD_LAN_NETSTATUSDETAILS DIALOGEX 0, 0, 190, 175 STYLE DS_SHELLFONT | WS_POPUP | WS_CAPTION | DS_MODALFRAME -CAPTION "Network Connection Details" +CAPTION "Hálózati kapcsolat részletei" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Network Connection &Details:", -1, 10, 4, 170, 12 + LTEXT "Hálózati kapcsolat &részletei:", -1, 10, 4, 170, 12 CONTROL "", IDC_DETAILS, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 10, 15, 170, 130 - PUSHBUTTON "&Close", IDC_CLOSE, 120, 155, 60, 14 + PUSHBUTTON "&Bezárás", IDC_CLOSE, 120, 155, 60, 14 END IDD_NETWORKSETTINGSPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Setup" +CAPTION "ReactOS telepítő" FONT 8, "MS Shell Dlg" BEGIN ICON IDI_NET_SETUP, IDC_STATIC, 21, 10, 20, 20 - LTEXT "Choose whether to use typical or custom settings:", IDC_STATIC, 53, 7, 240, 20 - AUTORADIOBUTTON "Typical Settings", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Custom Settings", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP - LTEXT "Creates network connections using the Client for ReactOS Networks, File and Print Sharing for ReactOS Networks, and the TCP/IP transport protocol with automatic addressing.", IDC_STATIC, 65, 45, 240, 30 - LTEXT "Allows you to manually configure network components.", IDC_STATIC, 65, 90, 243, 20 + LTEXT "Kérjük válasszon hogy tipikus vagy egyedi beállításokat szeretne:", IDC_STATIC, 53, 7, 240, 20 + AUTORADIOBUTTON "Tipikus beállítások", IDC_NETWORK_TYPICAL, 53, 27, 253, 20, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Egyedi beállítások", IDC_NETWORK_CUSTOM, 53, 72, 253, 20, WS_TABSTOP + LTEXT "Hálózati kapcsolatokat hoz létre a ReactOS Networks ügyfél, ReactOS Networks fájl- és nyomtatómegosztás, valamint az automatikus címzésű TCP/IP átviteli protokoll használatával.", IDC_STATIC, 65, 45, 240, 30 + LTEXT "Lehetővé teszi hogy kézzel állítsa be a hálózati összetevőket.", IDC_STATIC, 65, 90, 243, 20 END IDD_NETWORKCOMPONENTPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Setup" +CAPTION "ReactOS telepítő" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "For Device:", IDC_STATIC, 33, 2, 100, 20 - LTEXT "n/a", IDC_NETWORK_DEVICE, 75, 2, 253, 20 - LTEXT "Components checked are used by this connection:", IDC_STATIC, 33, 12, 253, 20 + LTEXT "Ehhez az eszközhöz:", IDC_STATIC, 33, 2, 125, 20 + LTEXT "n/a", IDC_NETWORK_DEVICE, 100, 2, 253, 20 + LTEXT "A kijelölt elemeket használja ez a kapcsolat:", IDC_STATIC, 33, 12, 253, 20 CONTROL "", IDC_COMPONENT_LIST, "SysListView32", LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP, 33, 22, 250, 50 - PUSHBUTTON "&Install...", IDC_NETWORK_INSTALL, 122, 75, 50, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&Uninstall", IDC_NETWORK_UNINSTALL, 177, 75, 50, 14, WS_DISABLED | WS_TABSTOP - PUSHBUTTON "&Properties", IDC_NETWORK_PROPERTIES, 232, 75, 50, 14, WS_DISABLED | WS_TABSTOP - GROUPBOX "Description", IDC_STATIC, 33, 90, 250, 50, BS_GROUPBOX + PUSHBUTTON "&Telepítés...", IDC_NETWORK_INSTALL, 122, 75, 50, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "&Eltávolítás", IDC_NETWORK_UNINSTALL, 177, 75, 50, 14, WS_DISABLED | WS_TABSTOP + PUSHBUTTON "T&ulajdonságok", IDC_NETWORK_PROPERTIES, 232, 75, 50, 14, WS_DISABLED | WS_TABSTOP + GROUPBOX "Leírás", IDC_STATIC, 33, 90, 250, 50, BS_GROUPBOX END IDD_NETWORKDOMAINPAGE DIALOGEX 0, 0, 317, 143 STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU -CAPTION "ReactOS Setup" +CAPTION "ReactOS telepítő" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Do you want this computer to be a member of a domain?\n\ -(You can obtain this information from your network administrator.)", IDC_STATIC, 33, 2, 263, 50 - AUTORADIOBUTTON "No, this computer will be part of a workgroup.", IDC_SELECT_WORKGROUP, 33, 32, 253, 20, WS_TABSTOP | WS_GROUP - AUTORADIOBUTTON "Yes, this computer will be part of a domain.", IDC_SELECT_DOMAIN, 33, 47, 253, 20, WS_TABSTOP - LTEXT "Workgroup or Domain Name:", IDC_STATIC, 33, 72, 126, 14 + LTEXT "Szeretné hogy a számítógép egy tartomány tagja legyen?\n\ +(Ezt az információt a hálózati rendszergazdától kaphatja meg.)", IDC_STATIC, 33, 2, 263, 50 + AUTORADIOBUTTON "Nem, ez a számítógép egy munkacsoport tagja lesz.", IDC_SELECT_WORKGROUP, 33, 32, 253, 20, WS_TABSTOP | WS_GROUP + AUTORADIOBUTTON "Igen, ez a számítógép egy tartomány tagja lesz.", IDC_SELECT_DOMAIN, 33, 47, 253, 20, WS_TABSTOP + LTEXT "Munkacsoport vagy tartomány név:", IDC_STATIC, 33, 72, 126, 14 EDITTEXT IDC_DOMAIN_NAME, 33, 82, 126, 14, WS_VISIBLE | WS_TABSTOP | ES_AUTOHSCROLL - LTEXT "NOTE: If this computer isn't going to be part of a network, you don't have sufficient rights to join a domain, or you don't know what to enter, then just choose workgroup for now. These options can be changed at a later time.", IDC_STATIC, 33, 107, 263, 50 + LTEXT "Megjegyzés: Ha a számítógép nem lesz egy hálózat része, nincs megfelelő jogosultsága tartományhoz csatlakozáshoz, vagy nem tudja mit adjon meg, akkor egyelőre válassza a munkacsoportot. Később meg lehet változtatni ezeket a beállításokat.", IDC_STATIC, 33, 107, 263, 50 END STRINGTABLE BEGIN - IDS_PHYSICAL_ADDRESS "Physical Address" - IDS_IP_ADDRESS "IP Address" - IDS_SUBNET_MASK "Subnet Mask" - IDS_DEF_GATEWAY "Default Gateway" - IDS_DHCP_SERVER "DHCP Server" - IDS_LEASE_OBTAINED "Lease Obtained" - IDS_LEASE_EXPIRES "Lease Expires" - IDS_DNS_SERVERS "DNS Servers" - IDS_WINS_SERVERS "WINS Servers" - IDS_PROPERTY "Property" - IDS_VALUE "Value" - IDS_NETWORKCONNECTION "Network Connections" - IDS_SHV_COLUMN_NAME "Name" - IDS_SHV_COLUMN_TYPE "Type" - IDS_SHV_COLUMN_STATE "Status" - IDS_SHV_COLUMN_DEVNAME "Device Name" - IDS_SHV_COLUMN_PHONE "Phone # or Host Address" - IDS_SHV_COLUMN_OWNER "Owner" - IDS_TYPE_ETHERNET "LAN or High-Speed Internet" - IDS_STATUS_NON_OPERATIONAL "Disabled" - IDS_STATUS_UNREACHABLE "Not Connected" - IDS_STATUS_DISCONNECTED "Network cable unplugged" - IDS_STATUS_CONNECTING "Acquiring network address" - IDS_STATUS_CONNECTED "Connected" - IDS_STATUS_OPERATIONAL "Connected" - IDS_NET_ACTIVATE "Enable" - IDS_NET_DEACTIVATE "Disable" - IDS_NET_STATUS "Status" - IDS_NET_REPAIR "Repair" - IDS_NET_CREATELINK "Create Shortcut" - IDS_NET_DELETE "Delete" - IDS_NET_RENAME "Rename" - IDS_NET_PROPERTIES "Properties" + IDS_PHYSICAL_ADDRESS "Fizikai cím" + IDS_IP_ADDRESS "IP cím" + IDS_SUBNET_MASK "Alhálózati maszk" + IDS_DEF_GATEWAY "Alapértelmezett átjáró" + IDS_DHCP_SERVER "DHCP szerver" + IDS_LEASE_OBTAINED "Bérleti jog kezdete" + IDS_LEASE_EXPIRES "Bérleti jog vége" + IDS_DNS_SERVERS "DNS szerver" + IDS_WINS_SERVERS "WINS szerver" + IDS_PROPERTY "Tulajdonság" + IDS_VALUE "Érték" + IDS_NETWORKCONNECTION "Hálózati kapcsolatok" + IDS_SHV_COLUMN_NAME "Név" + IDS_SHV_COLUMN_TYPE "Típus" + IDS_SHV_COLUMN_STATE "Állapot" + IDS_SHV_COLUMN_DEVNAME "Eszköznév" + IDS_SHV_COLUMN_PHONE "Telefonszám vagy gazdagép cím" + IDS_SHV_COLUMN_OWNER "Tulajdonos" + IDS_TYPE_ETHERNET "LAN vagy nagy sebességű internet" + IDS_STATUS_NON_OPERATIONAL "Letiltva" + IDS_STATUS_UNREACHABLE "Nincs csatlakoztatva" + IDS_STATUS_DISCONNECTED "Hálózati kábel nincs bedugva" + IDS_STATUS_CONNECTING "Hálózati cím lekérése" + IDS_STATUS_CONNECTED "Csatlakoztatva" + IDS_STATUS_OPERATIONAL "Csatlakoztatva" + IDS_NET_ACTIVATE "Engedélyezés" + IDS_NET_DEACTIVATE "Letiltás" + IDS_NET_STATUS "Állapot" + IDS_NET_REPAIR "Javítás" + IDS_NET_CREATELINK "Parancsikon létrehozása" + IDS_NET_DELETE "Törlés" + IDS_NET_RENAME "Átnevezés" + IDS_NET_PROPERTIES "Tulajdonságok" IDS_FORMAT_BIT "%u Bit/s" IDS_FORMAT_KBIT "%u KBit/s" IDS_FORMAT_MBIT "%u MBit/s" IDS_FORMAT_GBIT "%u GBit/s" - IDS_DURATION_DAY "%d Day %s" - IDS_DURATION_DAYS "%d Days %s" - IDS_ASSIGNED_DHCP "Assigned by DHCP" - IDS_ASSIGNED_MANUAL "Manually configured" + IDS_DURATION_DAY "%d nap %s" + IDS_DURATION_DAYS "%d nap %s" + IDS_ASSIGNED_DHCP "DHCP-vel kiosztott" + IDS_ASSIGNED_MANUAL "Kézzel konfigurált" END STRINGTABLE BEGIN - IDS_NETWORKSETTINGSTITLE "Network Settings" - IDS_NETWORKSETTINGSSUBTITLE "Installs network software used to connect to other networks, computers, and the Internet." - IDS_NETWORKCOMPONENTTITLE "Network Components" - IDS_NETWORKCOMPONENTSUBTITLE "Determine which networking components are used on your computer. To add new components, click on Install." - IDS_NETWORKDOMAINTITLE "Workgroup or Computer Domain" - IDS_NETWORKDOMAINSUBTITLE "A domain is a group of computers defined by a network administrator. A workgroup is a group of computers sharing the same workgroup name." - IDS_REACTOS_SETUP "ReactOS Setup" - IDS_WZD_DOMAIN_NAME "Setup cannot continue until you\nenter the name of your domain\nor workgroup." + IDS_NETWORKSETTINGSTITLE "Hálózati beállítások" + IDS_NETWORKSETTINGSSUBTITLE "Hálózati szoftverek telepítése, melyek segítségével más hálózatokhoz, számítógépekhez vagy az internethez lehet csatlakozni." + IDS_NETWORKCOMPONENTTITLE "Hálózati összetevők" + IDS_NETWORKCOMPONENTSUBTITLE "Határozza meg hogy milyen hálózati összetevőket használ a számítógépen.\nÚj összetevő hozzáadásához kattintson a telepítés gombra." + IDS_NETWORKDOMAINTITLE "Munkacsoport vagy számítógépes tartomány" + IDS_NETWORKDOMAINSUBTITLE "A munkacsoport azonos munkacsoportnévvel rendelkező számítógépekből áll.\nA tartomány a hálózati rendszergazda által megadott számítógépcsoport." + IDS_REACTOS_SETUP "ReactOS telepítő" + IDS_WZD_DOMAIN_NAME "A telepítő nem tud továbblépni amíg\nnem adja meg a tartomány vagy munkacsoport nevét." END diff --git a/dll/win32/syssetup/lang/hu-HU.rc b/dll/win32/syssetup/lang/hu-HU.rc index 8c535fe39a7..668a1186bb4 100644 --- a/dll/win32/syssetup/lang/hu-HU.rc +++ b/dll/win32/syssetup/lang/hu-HU.rc @@ -23,20 +23,20 @@ BEGIN END IDD_PRODUCT DIALOGEX 0, 0, 317, 143 -CAPTION "ReactOS Setup" +CAPTION "ReactOS telepítő" STYLE DS_MODALFRAME | DS_SHELLFONT | WS_POPUPWINDOW | WS_CAPTION | WS_VISIBLE FONT 8, "MS Shell Dlg" BEGIN ICON "", IDC_PRODUCT_ICON, 5, 5, 20, 20 - LTEXT "Please choose a product option:", IDC_STATIC, 35, 7, 230, 12 - LTEXT "Product &Options:", IDC_STATIC, 5, 32, 85, 10 - COMBOBOX IDC_PRODUCT_OPTIONS, 95, 30, 170, 300, CBS_HASSTRINGS | CBS_AUTOHSCROLL | CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - GROUPBOX "Product Information", IDC_STATIC, 5, 50, 305, 85 + LTEXT "Kérjük válasszon egy kiadást:", IDC_STATIC, 35, 7, 230, 12 + LTEXT "&Kiadások:", IDC_STATIC, 5, 32, 85, 10 + COMBOBOX IDC_PRODUCT_OPTIONS, 95, 30, 135, 300, CBS_HASSTRINGS | CBS_AUTOHSCROLL | CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + GROUPBOX "Kiadási információk", IDC_STATIC, 5, 50, 305, 85 LTEXT "ProductSuite:", IDC_STATIC, 20, 62, 70, 10 EDITTEXT IDC_PRODUCT_SUITE, 95, 60, 175, 14, ES_READONLY | ES_AUTOHSCROLL LTEXT "ProductType:", IDC_STATIC, 20, 82, 70, 10 EDITTEXT IDC_PRODUCT_TYPE, 95, 80, 110, 14, ES_READONLY | ES_AUTOHSCROLL - LTEXT "Description:", IDC_STATIC, 20, 102, 70, 10 + LTEXT "Leírás:", IDC_STATIC, 20, 102, 70, 10 EDITTEXT IDC_PRODUCT_DESCRIPTION, 95, 99, 205, 30, ES_READONLY | ES_AUTOVSCROLL | ES_MULTILINE | WS_VSCROLL END @@ -223,7 +223,7 @@ END /* ATTENTION: Synchronize these strings with dll/win32/shell32/lang */ STRINGTABLE BEGIN - IDS_PROGRAMFILES "%SystemDrive%\\Program Files" + IDS_PROGRAMFILES "%SystemDrive%\\Programfájlok" IDS_COMMONFILES "Common Files" END @@ -244,10 +244,10 @@ END STRINGTABLE BEGIN - IDS_PRODUCTTITLE "Product Options" - IDS_PRODUCTSUBTITLE "You can choose a product option that affects the behaviour of the system." - IDS_PRODUCTSERVERNAME "ReactOS Server" - IDS_PRODUCTWORKSTATIONNAME "ReactOS Workstation (Default)" - IDS_PRODUCTSERVERINFO "The system will be recognized as a server. Private folders ""My Pictures"", ""My Videos"" and ""My Music"" are independent from ""My Documents""." - IDS_PRODUCTWORKSTATIONINFO "The system will be recognized as a workstation. Private folders ""My Pictures"", ""My Videos"" and ""My Music"" are in ""My Documents""." + IDS_PRODUCTTITLE "Kiadások" + IDS_PRODUCTSUBTITLE "Választhat egy kiadást, amely befolyásolja a rendszer viselkedését." + IDS_PRODUCTSERVERNAME "ReactOS Szerver" + IDS_PRODUCTWORKSTATIONNAME "ReactOS Munkaállomás (alapértelmezett)" + IDS_PRODUCTSERVERINFO "A rendszer szerverként lesz felismerhető. A ""Képek"", ""Videók"" és ""Zenék"" személyes mappák függetlenek lesznek a ""Dokumentumok"" mappától." + IDS_PRODUCTWORKSTATIONINFO "A rendszer munkaállomásként lesz felismerhető. A ""Képek"", ""Videók"" és ""Zenék"" személyes mappák a ""Dokumentumok"" mappában lesznek." END diff --git a/dll/win32/userenv/lang/hu-HU.rc b/dll/win32/userenv/lang/hu-HU.rc index 3f78f8d2507..21a551fd32a 100644 --- a/dll/win32/userenv/lang/hu-HU.rc +++ b/dll/win32/userenv/lang/hu-HU.rc @@ -15,7 +15,7 @@ BEGIN IDS_TEMPLATES "Sablonok" IDS_STARTMENU "Start menü" IDS_PROGRAMS "Start menü\\Programok" - IDS_STARTUP "Start Menü\\Programok\\Automatikus indítás" + IDS_STARTUP "Start menü\\Programok\\Automatikus indítás" IDS_LOCALSETTINGS "Local Settings" IDS_LOCALAPPDATA "Local Settings\\Alkalmazás adatok" IDS_TEMP "Local Settings\\Temp" /* See also TEMP_DIR in boot/bootdata/hivedef.inf */ diff --git a/media/inf/shortcuts.inf b/media/inf/shortcuts.inf index 027d25b049e..826f8850056 100644 --- a/media/inf/shortcuts.inf +++ b/media/inf/shortcuts.inf @@ -649,64 +649,71 @@ UTILMAN_DESC=הפעל את מנהל כלי הנגישות ; Hungarian [Strings.040E] -ACCESSORIES=Accessories -SYSTOOLS=System Tools -ACCESSIBILITY=Accessibility -ENTERTAINMENT=Entertainment -COMMUNICATIONS=Communications +ACCESSORIES=Kellékek +SYSTOOLS=Rendszereszközök +ACCESSIBILITY=Kisegítő lehetőségek +ENTERTAINMENT=Szórakozás +COMMUNICATIONS=Kommunikáció GAMES=Játékok -CMD_TITLE=Command Prompt -CMD_DESC=Open command prompt -EXPLORER_TITLE=ReactOS Explorer -EXPLORER_DESC=Launch Explorer -RAPPS_TITLE=ReactOS Applications Manager -RAPPS_TITLE_SHORT=Applications Manager -RAPPS_DESC=Download and install various applications -SERVMAN_TITLE=Service Manager -SERVMAN_DESC=Launch Service Manager -DEVMGMT_TITLE=Device Manager -DEVMGMT_DESC=Launch Device Manager -EVENTVWR_TITLE=Event Viewer -EVENTVWR_DESC=Launch Event Viewer -MSCONFIG_TITLE=System Configuration -MSCONFIG_DESC=Launch System Configuration program -CALC_TITLE=Calculator -CALC_DESC=Launch Calculator -NOTEPAD_TITLE=Notepad -NOTEPAD_DESC=Launch Text Editor -MSTSC_TITLE=Remote Desktop Connection -MSTSC_DESC=Launch Remote Desktop Connection +README_TITLE=Olvass el +README_DESC=ReactOS Olvass-el fájl + +CMD_TITLE=Parancssor +CMD_DESC=Parancssor megnyitása +EXPLORER_TITLE=ReactOS Intéző +EXPLORER_DESC=Intéző indítása +RAPPS_TITLE=ReactOS Alkalmazáskezelő +RAPPS_TITLE_SHORT=Alkalmazáskezelő +RAPPS_DESC=Alkalmazások letöltése és telepítése +SERVMAN_TITLE=Szolgáltatáskezelő +SERVMAN_DESC=Szolgáltatáskezelő indítása +DEVMGMT_TITLE=Eszközkezelő +DEVMGMT_DESC=Eszközkezelő indítása +EVENTVWR_TITLE=Eseménynapló +EVENTVWR_DESC=Eseménynapló indítása +MSCONFIG_TITLE=Rendszerkonfiguráció +MSCONFIG_DESC=Rendszerkonfigurációs segédprogram indítása +CALC_TITLE=Számológép +CALC_DESC=Számológép indítása +NOTEPAD_TITLE=Jegyzettömb +NOTEPAD_DESC=Jegyzettömb indítása +MSTSC_TITLE=Távoli asztali kapcsolat +MSTSC_DESC=Távoli asztali kapcsolat indítása WORDPAD_TITLE=WordPad -WORDPAD_DESC=Launch Document Editor +WORDPAD_DESC=Dokumentumszerkesztő indítása MSPAINT_TITLE=Paint -MSPAINT_DESC=Launch Paint -CHARMAP_TITLE=CharMap -CHARMAP_DESC=CharMap -CLIPBRD_TITLE=Clipboard Viewer -CLIPBRD_DESC=Clipboard Viewer -KBSWITCH_TITLE=Keyboard Layout Switcher -KBSWITCH_DESC=Keyboard Layout Switcher -REGEDIT_TITLE=Registry Editor -REGEDIT_DESC=Launch Registry Editor -DXDIAG_TITLE=ReactX Diagnostic -DXDIAG_DESC=Launch ReactX-Diagnostic program -MAGNIFY_TITLE=Magnify -MAGNIFY_DESC=Magnify +MSPAINT_DESC=Paint indítása +CHARMAP_TITLE=Karaktertábla +CHARMAP_DESC=Karaktertábla +CLIPBRD_TITLE=Vágólap megjelenítő +CLIPBRD_DESC=Vágólap megjelenítő +KBSWITCH_TITLE=Billentyűzetkiosztás-váltó +KBSWITCH_DESC=Billentyűzetkiosztás-váltó +REGEDIT_TITLE=Regisztrációs adatbázis szerkesztő +REGEDIT_DESC=Regisztrációs adatbázis szerkesztő indítása +TASKMGR_TITLE=Feladatkezelő +TASKMGR_DESC=Feladatkezelő indítása +DXDIAG_TITLE=ReactX diagnosztika +DXDIAG_DESC=ReactX diagnosztikai program indítása +MAGNIFY_TITLE=Nagyító +MAGNIFY_DESC=Nagyító OSK_TITLE=A képernyőn megjelenő billentyűzet OSK_DESC=A képernyőn megjelenő billentyűzet indítása -MPLAY_TITLE=Multimedia Player -MPLAY_DESC=Launch Multimedia Player -SNDVOL_TITLE=Volume Control -SNDVOL_DESC=Launch Volume Control -SNDREC32_TITLE=Sound Recorder -SNDREC32_DESC=Launch Sound Recorder -SOL_TITLE=Solitaire +MPLAY_TITLE=Médialejátszó +MPLAY_DESC=Médialejátszó indítása +SNDVOL_TITLE=Hangerőszabályzó +SNDVOL_DESC=Hangerőszabályzó indítása +SNDREC32_TITLE=Hangrögzítő +SNDREC32_DESC=Hangrögzítő indítása +SOL_TITLE=Pasziánsz SOL_DESC=Pasziánsz -WINMINE_TITLE=WineMine -WINMINE_DESC=WineMine -SPIDER_TITLE=Spider Solitaire -SPIDER_DESC=Spider Solitaire +WINMINE_TITLE=Aknakereső +WINMINE_DESC=Aknakereső +SPIDER_TITLE=Fekete Özvegy +SPIDER_DESC=Fekete Özvegy +UTILMAN_TITLE=Kisegítő lehetőségek kezelő +UTILMAN_DESC=Kisegítő lehetőségek kezelő indítása ; Indonesian [Strings.0421] diff --git a/modules/rosapps/rosapps_shortcuts.inf b/modules/rosapps/rosapps_shortcuts.inf index 321ab89cfbc..a95f6eb8f86 100644 --- a/modules/rosapps/rosapps_shortcuts.inf +++ b/modules/rosapps/rosapps_shortcuts.inf @@ -165,19 +165,19 @@ VCD_DESC=Manage virtual CDRom drives ; Hungarian [Strings.040E] -ACCESSORIES=Accessories -SYSTOOLS=System Tools -ACCESSIBILITY=Accessibility -ENTERTAINMENT=Entertainment -COMMUNICATIONS=Communications +ACCESSORIES=Kellékek +SYSTOOLS=Rendszereszközök +ACCESSIBILITY=Kisegítő lehetőségek +ENTERTAINMENT=Szórakozás +COMMUNICATIONS=Kommunikáció GAMES=Játékok -FONTSUB_TITLE=FontSub -FONTSUB_DESC=Font Substitutes Editor -SCREENSHOT_TITLE=SnapShot -SCREENSHOT_DESC=Take screenshot -VCD_TITLE=Virtual CDRom Control Panel -VCD_DESC=Manage virtual CDRom drives +FONTSUB_TITLE=Betűtípus-helyettesítő +FONTSUB_DESC=Betűtípus-helyettesítő szerkesztő +SCREENSHOT_TITLE=Képernyőkép +SCREENSHOT_DESC=Képernyőkép készítése +VCD_TITLE=Virtuális CD-ROM vezérlőpult +VCD_DESC=Virtuális CD-ROM-ok kezelése ; Indonesian [Strings.0421]
4 years, 9 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
16
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Results per page:
10
25
50
100
200