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
June 2005
----- 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
22 participants
649 discussions
Start a n
N
ew thread
[ea] 15729: SM/CSR: move win32k.sys loading from the SM to the Win32 user mode server.
by ea@svn.reactos.com
SM/CSR: move win32k.sys loading from the SM to the Win32 user mode server. Modified: trunk/reactos/include/sm/helper.h Modified: trunk/reactos/include/sm/ns.h Modified: trunk/reactos/lib/smdll/smdll.def Modified: trunk/reactos/lib/smlib/compses.c Modified: trunk/reactos/lib/smlib/connect.c Modified: trunk/reactos/lib/smlib/execpgm.c Added: trunk/reactos/lib/smlib/lookupss.c Modified: trunk/reactos/lib/smlib/smlib.xml Modified: trunk/reactos/subsys/csrss/csrss.c Modified: trunk/reactos/subsys/csrss/init.c Modified: trunk/reactos/subsys/smss/initss.c Modified: trunk/reactos/subsys/smss/smapiexec.c Modified: trunk/reactos/subsys/smss/smss.h _____ Modified: trunk/reactos/include/sm/helper.h --- trunk/reactos/include/sm/helper.h 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/include/sm/helper.h 2005-06-02 13:17:37 UTC (rev 15729) @@ -30,5 +30,11 @@ IN OUT PVOID Data, IN ULONG DataLength, IN OUT PULONG ReturnedDataLength OPTIONAL); - +/* smlib/lookupss.c */ +NTSTATUS STDCALL +SmLookupSubsystem (IN PWSTR Name, + IN OUT PWSTR Data, + IN OUT PULONG DataLength, + IN OUT PULONG DataType, + IN PVOID Environment OPTIONAL); #endif /* ndef INCLUDE_SM_HELPER_H */ _____ Modified: trunk/reactos/include/sm/ns.h --- trunk/reactos/include/sm/ns.h 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/include/sm/ns.h 2005-06-02 13:17:37 UTC (rev 15729) @@ -1,13 +1,13 @@ -#if !defined(INCLUDE_SM_NS_H) -#define INCLUDE_SM_NS_H - -/* $Id: helper.h 13689 2005-02-20 16:46:10Z ea $ */ - -#define SM_REGISTRY_ROOT_NAME L"\\Session Manager" -#define SM_REGISTRY_SUBSYSTEMS_NAME L"SubSystems" - -#define SM_API_PORT_NAME L"\\SmApiPort" -#define SM_DBGSS_PORT_NAME L"\\DbgSsApiPort" -#define SM_DBGUI_PORT_NAME L"\\DbgUiApiPort" - -#endif /* ndef INCLUDE_SM_NS_H */ +#if !defined(INCLUDE_SM_NS_H) +#define INCLUDE_SM_NS_H + +/* $Id$ */ + +#define SM_REGISTRY_ROOT_NAME L"\\Session Manager" +#define SM_REGISTRY_SUBSYSTEMS_NAME L"SubSystems" + +#define SM_API_PORT_NAME L"\\SmApiPort" +#define SM_DBGSS_PORT_NAME L"\\DbgSsApiPort" +#define SM_DBGUI_PORT_NAME L"\\DbgUiApiPort" + +#endif /* ndef INCLUDE_SM_NS_H */ Property changes on: trunk/reactos/include/sm/ns.h ___________________________________________________________________ Name: svn:keywords + id author date revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/smdll/smdll.def --- trunk/reactos/lib/smdll/smdll.def 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/lib/smdll/smdll.def 2005-06-02 13:17:37 UTC (rev 15729) @@ -4,3 +4,4 @@ SmConnectApiPort@16 SmExecuteProgram@8 SmQueryInformation@20 +SmLookupSubsystem@20 _____ Modified: trunk/reactos/lib/smlib/compses.c --- trunk/reactos/lib/smlib/compses.c 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/lib/smlib/compses.c 2005-06-02 13:17:37 UTC (rev 15729) @@ -1,63 +1,63 @@ -/* $Id: compses.c 13731 2005-02-23 23:37:06Z ea $ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/smlib/compses.c - * PURPOSE: Call SM API SM_API_COMPLETE_SESSION - */ -#define NTOS_MODE_USER -#include <ntos.h> -#include <sm/helper.h> - -#define NDEBUG -#include <debug.h> - -/********************************************************************** - * NAME EXPORTED - * SmCompleteSession/3 - * - * DESCRIPTION - * This function is called by an environment subsystem server to - * tell the SM it finished initialization phase and is ready to - * manage processes it registered for (SmConnectApiPort). - * - * ARGUMENTS - * hSmApiPort: port handle returned by SmConnectApiPort; - * hSbApiPort: call back API port of the subsystem (handle); - * hApiPort : API port of the subsystem (handle). - * - * RETURN VALUE - * Success status as handed by the SM reply; otherwise a failure - * status code. - */ -NTSTATUS STDCALL -SmCompleteSession (IN HANDLE hSmApiPort, - IN HANDLE hSbApiPort, - IN HANDLE hApiPort) -{ - NTSTATUS Status; - SM_PORT_MESSAGE SmReqMsg; - - DPRINT("SMLIB: %s called\n", __FUNCTION__); - - /* Marshal Ses in the LPC message */ - SmReqMsg.Request.CompSes.hApiPort = hApiPort; - SmReqMsg.Request.CompSes.hSbApiPort = hSbApiPort; - - /* SM API to invoke */ - SmReqMsg.SmHeader.ApiIndex = SM_API_COMPLETE_SESSION; - - /* Port message */ - SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; - SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request); - SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; - Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); - if (NT_SUCCESS(Status)) - { - return SmReqMsg.SmHeader.Status; - } - DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status); - return Status; -} - -/* EOF */ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/smlib/compses.c + * PURPOSE: Call SM API SM_API_COMPLETE_SESSION + */ +#define NTOS_MODE_USER +#include <ntos.h> +#include <sm/helper.h> + +#define NDEBUG +#include <debug.h> + +/********************************************************************** + * NAME EXPORTED + * SmCompleteSession/3 + * + * DESCRIPTION + * This function is called by an environment subsystem server to + * tell the SM it finished initialization phase and is ready to + * manage processes it registered for (SmConnectApiPort). + * + * ARGUMENTS + * hSmApiPort: port handle returned by SmConnectApiPort; + * hSbApiPort: call back API port of the subsystem (handle); + * hApiPort : API port of the subsystem (handle). + * + * RETURN VALUE + * Success status as handed by the SM reply; otherwise a failure + * status code. + */ +NTSTATUS STDCALL +SmCompleteSession (IN HANDLE hSmApiPort, + IN HANDLE hSbApiPort, + IN HANDLE hApiPort) +{ + NTSTATUS Status; + SM_PORT_MESSAGE SmReqMsg; + + DPRINT("SMLIB: %s called\n", __FUNCTION__); + + /* Marshal Ses in the LPC message */ + SmReqMsg.Request.CompSes.hApiPort = hApiPort; + SmReqMsg.Request.CompSes.hSbApiPort = hSbApiPort; + + /* SM API to invoke */ + SmReqMsg.SmHeader.ApiIndex = SM_API_COMPLETE_SESSION; + + /* Port message */ + SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; + SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request); + SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; + Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + if (NT_SUCCESS(Status)) + { + return SmReqMsg.SmHeader.Status; + } + DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ Property changes on: trunk/reactos/lib/smlib/compses.c ___________________________________________________________________ Name: svn:keywords + id author date revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/smlib/connect.c --- trunk/reactos/lib/smlib/connect.c 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/lib/smlib/connect.c 2005-06-02 13:17:37 UTC (rev 15729) @@ -1,106 +1,106 @@ -/* $Id: connect.c 14015 2005-03-13 17:00:19Z ea $ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: reactos/lib/smlib/connect.c - * PURPOSE: Connect to the API LPC port exposed by the SM - */ -#define NTOS_MODE_USER -#include <ntos.h> -#include <sm/helper.h> -#include <pe.h> - -#define NDEBUG -#include <debug.h> - -/********************************************************************** - * NAME EXPORTED - * SmConnectApiPort/4 - * - * DESCRIPTION - * Connect to SM API port and register a session "begin" port (Sb) - * or to issue API requests to SmApiPort. - * - * ARGUMENTS - * pSbApiPortName: name of the Sb port the calling subsystem - * server already created in the system name space; - * hSbApiPort: LPC port handle (checked, but not used: the - * subsystem is required to have already created - * the callback port before it connects to the SM); - * wSubsystem: a valid IMAGE_SUBSYSTEM_xxx value; - * phSmApiPort: a pointer to a HANDLE, which will be - * filled with a valid client-side LPC comm port. - * - * There should be only two ways to call this API: - * a) subsystems willing to register with SM will use it - * with full parameters (the function checks them); - * b) regular SM clients, will set to 0 the 1st, the 2nd, - * and the 3rd parameter. - * - * RETURN VALUE - * If all three optional values are omitted, an LPC status. - * STATUS_INVALID_PARAMETER_MIX if PortName is defined and - * both hSbApiPort and wSubsystem are 0. - */ -NTSTATUS STDCALL -SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, - IN HANDLE hSbApiPort OPTIONAL, - IN WORD wSubSystemId OPTIONAL, - IN OUT PHANDLE phSmApiPort) -{ - UNICODE_STRING SmApiPortName; - SECURITY_QUALITY_OF_SERVICE SecurityQos; - NTSTATUS Status = STATUS_SUCCESS; - SM_CONNECT_DATA ConnectData = {0,0,{0}}; - ULONG ConnectDataLength = 0; - - DPRINT("SMLIB: %s called\n", __FUNCTION__); - - if (pSbApiPortName) - { - if (pSbApiPortName->Length > (sizeof pSbApiPortName->Buffer[0] * SM_SB_NAME_MAX_LENGTH)) - { - return STATUS_INVALID_PARAMETER_1; - } - if (NULL == hSbApiPort || IMAGE_SUBSYSTEM_UNKNOWN == wSubSystemId) - { - return STATUS_INVALID_PARAMETER_MIX; - } - RtlZeroMemory (& ConnectData, sizeof ConnectData); - ConnectData.Unused = 0; - ConnectData.SubSystemId = wSubSystemId; - if (pSbApiPortName->Length > 0) - { - RtlCopyMemory (& ConnectData.SbName, - pSbApiPortName->Buffer, - pSbApiPortName->Length); - } - } - ConnectDataLength = sizeof ConnectData; - - SecurityQos.Length = sizeof (SecurityQos); - SecurityQos.ImpersonationLevel = SecurityIdentification; - SecurityQos.ContextTrackingMode = TRUE; - SecurityQos.EffectiveOnly = TRUE; - - RtlInitUnicodeString (& SmApiPortName, SM_API_PORT_NAME); - - Status = NtConnectPort ( - phSmApiPort, - & SmApiPortName, - & SecurityQos, - NULL, - NULL, - NULL, - & ConnectData, - & ConnectDataLength - ); - if (NT_SUCCESS(Status)) - { - return STATUS_SUCCESS; - } - DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status); - return Status; -} - -/* EOF */ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: reactos/lib/smlib/connect.c + * PURPOSE: Connect to the API LPC port exposed by the SM + */ +#define NTOS_MODE_USER +#include <ntos.h> +#include <sm/helper.h> +#include <pe.h> + +#define NDEBUG +#include <debug.h> + +/********************************************************************** + * NAME EXPORTED + * SmConnectApiPort/4 + * + * DESCRIPTION + * Connect to SM API port and register a session "begin" port (Sb) + * or to issue API requests to SmApiPort. + * + * ARGUMENTS + * pSbApiPortName: name of the Sb port the calling subsystem + * server already created in the system name space; + * hSbApiPort: LPC port handle (checked, but not used: the + * subsystem is required to have already created + * the callback port before it connects to the SM); + * wSubsystem: a valid IMAGE_SUBSYSTEM_xxx value; + * phSmApiPort: a pointer to a HANDLE, which will be + * filled with a valid client-side LPC comm port. + * + * There should be only two ways to call this API: + * a) subsystems willing to register with SM will use it + * with full parameters (the function checks them); + * b) regular SM clients, will set to 0 the 1st, the 2nd, + * and the 3rd parameter. + * + * RETURN VALUE + * If all three optional values are omitted, an LPC status. + * STATUS_INVALID_PARAMETER_MIX if PortName is defined and + * both hSbApiPort and wSubsystem are 0. + */ +NTSTATUS STDCALL +SmConnectApiPort (IN PUNICODE_STRING pSbApiPortName OPTIONAL, + IN HANDLE hSbApiPort OPTIONAL, + IN WORD wSubSystemId OPTIONAL, + IN OUT PHANDLE phSmApiPort) +{ + UNICODE_STRING SmApiPortName; + SECURITY_QUALITY_OF_SERVICE SecurityQos; + NTSTATUS Status = STATUS_SUCCESS; + SM_CONNECT_DATA ConnectData = {0,0,{0}}; + ULONG ConnectDataLength = 0; + + DPRINT("SMLIB: %s called\n", __FUNCTION__); + + if (pSbApiPortName) + { + if (pSbApiPortName->Length > (sizeof pSbApiPortName->Buffer[0] * SM_SB_NAME_MAX_LENGTH)) + { + return STATUS_INVALID_PARAMETER_1; + } + if (NULL == hSbApiPort || IMAGE_SUBSYSTEM_UNKNOWN == wSubSystemId) + { + return STATUS_INVALID_PARAMETER_MIX; + } + RtlZeroMemory (& ConnectData, sizeof ConnectData); + ConnectData.Unused = 0; + ConnectData.SubSystemId = wSubSystemId; + if (pSbApiPortName->Length > 0) + { + RtlCopyMemory (& ConnectData.SbName, + pSbApiPortName->Buffer, + pSbApiPortName->Length); + } + } + ConnectDataLength = sizeof ConnectData; + + SecurityQos.Length = sizeof (SecurityQos); + SecurityQos.ImpersonationLevel = SecurityIdentification; + SecurityQos.ContextTrackingMode = TRUE; + SecurityQos.EffectiveOnly = TRUE; + + RtlInitUnicodeString (& SmApiPortName, SM_API_PORT_NAME); + + Status = NtConnectPort ( + phSmApiPort, + & SmApiPortName, + & SecurityQos, + NULL, + NULL, + NULL, + & ConnectData, + & ConnectDataLength + ); + if (NT_SUCCESS(Status)) + { + return STATUS_SUCCESS; + } + DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ Property changes on: trunk/reactos/lib/smlib/connect.c ___________________________________________________________________ Name: svn:keywords + id author date revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/smlib/execpgm.c --- trunk/reactos/lib/smlib/execpgm.c 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/lib/smlib/execpgm.c 2005-06-02 13:17:37 UTC (rev 15729) @@ -1,87 +1,87 @@ -/* $Id: execpgm.c 13731 2005-02-23 23:37:06Z ea $ - * - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/smlib/execpgm.c - * PURPOSE: Call SM API SM_API_EXECPGM - */ -#define NTOS_MODE_USER -#include <ntos.h> -#include <sm/helper.h> -#include <string.h> - -#define NDEBUG -#include <debug.h> - -/********************************************************************** - * NAME EXPORTED - * SmExecuteProgram/2 - * - * DESCRIPTION - * This function is used to make the SM start an environment - * subsystem server process. - * - * ARGUMENTS - * hSmApiPort: port handle returned by SmConnectApiPort; - * Pgm : name of the subsystem (to be used by the SM to - * lookup the image name from the registry). - * Valid names are: DEBUG, WINDOWS, POSIX, OS2, - * and VMS. - * - * RETURN VALUE - * Success status as handed by the SM reply; otherwise a failure - * status code. - */ -NTSTATUS STDCALL -SmExecuteProgram (IN HANDLE hSmApiPort, - IN PUNICODE_STRING Pgm) -{ - NTSTATUS Status; - SM_PORT_MESSAGE SmReqMsg; - - - DPRINT("SMLIB: %s(%08lx,'%S') called\n", - __FUNCTION__, hSmApiPort, Pgm->Buffer); - - /* Check Pgm's length */ - if (Pgm->Length > (sizeof (Pgm->Buffer[0]) * SM_EXEXPGM_MAX_LENGTH)) - { - return STATUS_INVALID_PARAMETER; - } - /* Marshal Pgm in the LPC message */ - RtlZeroMemory (& SmReqMsg, sizeof SmReqMsg); - SmReqMsg.Request.ExecPgm.NameLength = Pgm->Length; - RtlCopyMemory (SmReqMsg.Request.ExecPgm.Name, - Pgm->Buffer, - Pgm->Length); - - /* SM API to invoke */ - SmReqMsg.SmHeader.ApiIndex = SM_API_EXECUTE_PROGRAMME; - - /* LPC message */ - SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; - SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request); - SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; - - DPRINT("SMLIB: %s:\n" - " MessageType = %d\n" - " DataSize = %d\n" - " MessageSize = %d\n" - " sizeof(LPC_MESSAGE)==%d\n", - __FUNCTION__, - SmReqMsg.Header.MessageType, - SmReqMsg.Header.DataSize, - SmReqMsg.Header.MessageSize, - sizeof(LPC_MESSAGE)); - - /* Call SM and wait for a reply */ - Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); - if (NT_SUCCESS(Status)) - { - return SmReqMsg.SmHeader.Status; - } - DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status); - return Status; -} - -/* EOF */ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/smlib/execpgm.c + * PURPOSE: Call SM API SM_API_EXECPGM + */ +#define NTOS_MODE_USER +#include <ntos.h> +#include <sm/helper.h> +#include <string.h> + +#define NDEBUG +#include <debug.h> + +/********************************************************************** + * NAME EXPORTED + * SmExecuteProgram/2 + * + * DESCRIPTION + * This function is used to make the SM start an environment + * subsystem server process. + * + * ARGUMENTS + * hSmApiPort: port handle returned by SmConnectApiPort; + * Pgm : name of the subsystem (to be used by the SM to + * lookup the image name from the registry). + * Valid names are: DEBUG, WINDOWS, POSIX, OS2, + * and VMS. + * + * RETURN VALUE + * Success status as handed by the SM reply; otherwise a failure + * status code. + */ +NTSTATUS STDCALL +SmExecuteProgram (IN HANDLE hSmApiPort, + IN PUNICODE_STRING Pgm) +{ + NTSTATUS Status; + SM_PORT_MESSAGE SmReqMsg; + + + DPRINT("SMLIB: %s(%08lx,'%S') called\n", + __FUNCTION__, hSmApiPort, Pgm->Buffer); + + /* Check Pgm's length */ + if (Pgm->Length > (sizeof (Pgm->Buffer[0]) * SM_EXEXPGM_MAX_LENGTH)) + { + return STATUS_INVALID_PARAMETER; + } + /* Marshal Pgm in the LPC message */ + RtlZeroMemory (& SmReqMsg, sizeof SmReqMsg); + SmReqMsg.Request.ExecPgm.NameLength = Pgm->Length; + RtlCopyMemory (SmReqMsg.Request.ExecPgm.Name, + Pgm->Buffer, + Pgm->Length); + + /* SM API to invoke */ + SmReqMsg.SmHeader.ApiIndex = SM_API_EXECUTE_PROGRAMME; + + /* LPC message */ + SmReqMsg.Header.MessageType = LPC_NEW_MESSAGE; + SmReqMsg.Header.DataSize = SM_PORT_DATA_SIZE(SmReqMsg.Request); + SmReqMsg.Header.MessageSize = SM_PORT_MESSAGE_SIZE; + + DPRINT("SMLIB: %s:\n" + " MessageType = %d\n" + " DataSize = %d\n" + " MessageSize = %d\n" + " sizeof(LPC_MESSAGE)==%d\n", + __FUNCTION__, + SmReqMsg.Header.MessageType, + SmReqMsg.Header.DataSize, + SmReqMsg.Header.MessageSize, + sizeof(LPC_MESSAGE)); + + /* Call SM and wait for a reply */ + Status = NtRequestWaitReplyPort (hSmApiPort, (PLPC_MESSAGE) & SmReqMsg, (PLPC_MESSAGE) & SmReqMsg); + if (NT_SUCCESS(Status)) + { + return SmReqMsg.SmHeader.Status; + } + DPRINT("SMLIB: %s failed (Status=0x%08lx)\n", __FUNCTION__, Status); + return Status; +} + +/* EOF */ Property changes on: trunk/reactos/lib/smlib/execpgm.c ___________________________________________________________________ Name: svn:keywords + id author date revision Name: svn:eol-style + native _____ Added: trunk/reactos/lib/smlib/lookupss.c --- trunk/reactos/lib/smlib/lookupss.c 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/lib/smlib/lookupss.c 2005-06-02 13:17:37 UTC (rev 15729) @@ -0,0 +1,155 @@ +/* $Id$ + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/smlib/lookupss.c + */ +#define NTOS_MODE_USER +#include <ntos.h> +#include <sm/helper.h> + +#define NDEBUG +#include <debug.h> + +/********************************************************************** + * NAME EXPORTED + * SmLookupSubsystem/6 + * + * DESCRIPTION + * Read from the registry key + * \Registry\SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems + * the value which name is Name. + * + * ARGUMENTS + * Name: name of the program to run, that is a value's name in + * the SM registry key Subsystems; + * Data: what the registry gave back for Name; + * DataLength: how much Data the registry returns; + * DataType: what is Data? + * Environment: set it if you want this function to use it + * to possibly expand Data before giving it back; if set + * to NULL, no expansion will be performed. + */ +NTSTATUS STDCALL +SmLookupSubsystem (IN PWSTR Name, + IN OUT PWSTR Data, + IN OUT PULONG DataLength, + IN OUT PULONG DataType, + IN PVOID Environment OPTIONAL) +{ + NTSTATUS Status = STATUS_SUCCESS; + UNICODE_STRING usKeyName = {0}; + OBJECT_ATTRIBUTES Oa = {0}; + HANDLE hKey = (HANDLE) 0; + + DPRINT("SM: %s(Name='%S') called\n", __FUNCTION__, Name); + /* + * Prepare the key name to scan and + * related object attributes. + */ + RtlInitUnicodeString (& usKeyName, + L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\SubSystems"); + + InitializeObjectAttributes (& Oa, + & usKeyName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + /* + * Open the key. This MUST NOT fail, if the + * request is for a legitimate subsystem. + */ + Status = NtOpenKey (& hKey, + MAXIMUM_ALLOWED, + & Oa); + if(NT_SUCCESS(Status)) + { + UNICODE_STRING usValueName = {0}; + PWCHAR KeyValueInformation = NULL; + ULONG KeyValueInformationLength = 1024; + ULONG ResultLength = 0L; + PKEY_VALUE_PARTIAL_INFORMATION kvpi = NULL; + + KeyValueInformation = RtlAllocateHeap (RtlGetProcessHeap(), + 0, + KeyValueInformationLength); + if (NULL == KeyValueInformation) + { + return STATUS_NO_MEMORY; + } + kvpi = (PKEY_VALUE_PARTIAL_INFORMATION) KeyValueInformation; + RtlInitUnicodeString (& usValueName, Name); + Status = NtQueryValueKey (hKey, + & usValueName, + KeyValuePartialInformation, + KeyValueInformation, + KeyValueInformationLength, + & ResultLength); + if(NT_SUCCESS(Status)) + { + DPRINT("nkvpi.TitleIndex = %ld\n", kvpi->TitleIndex); + DPRINT("kvpi.Type = %ld\n", kvpi->Type); + DPRINT("kvpi.DataLength = %ld\n", kvpi->DataLength); + + if((NULL != Data) && (NULL != DataLength) && (NULL != DataType)) + { + *DataType = kvpi->Type; + if((NULL != Environment) && (REG_EXPAND_SZ == *DataType)) + { + UNICODE_STRING Source; + PWCHAR DestinationBuffer = NULL; + UNICODE_STRING Destination; + ULONG Length = 0; + + DPRINT("SM: %s: value will be expanded\n", __FUNCTION__); + + DestinationBuffer = RtlAllocateHeap (RtlGetProcessHeap(), + 0, + (2 * KeyValueInformationLength)); + if (NULL == DestinationBuffer) + { + Status = STATUS_NO_MEMORY; + } + else + { + Source.Length = kvpi->DataLength; + Source.MaximumLength = kvpi->DataLength; + Source.Buffer = (PWCHAR) & kvpi->Data; + + Destination.Length = 0; + Destination.MaximumLength = (2 * KeyValueInformationLength); + Destination.Buffer = DestinationBuffer; + + Status = RtlExpandEnvironmentStrings_U (Environment, + & Source, + & Destination, + & Length); + if(NT_SUCCESS(Status)) + { + *DataLength = min(*DataLength, Destination.Length); + RtlCopyMemory (Data, Destination.Buffer, *DataLength); + } + RtlFreeHeap (RtlGetProcessHeap(), 0, DestinationBuffer); + } + }else{ + DPRINT("SM: %s: value won't be expanded\n", __FUNCTION__); + *DataLength = min(*DataLength, kvpi->DataLength); + RtlCopyMemory (Data, & kvpi->Data, *DataLength); + } + *DataType = kvpi->Type; + }else{ + DPRINT1("SM: %s: Data or DataLength or DataType is NULL!\n", __FUNCTION__); + Status = STATUS_INVALID_PARAMETER; + } + }else{ + DPRINT1("%s: NtQueryValueKey failed (Status=0x%08lx)\n", __FUNCTION__, Status); + } + RtlFreeHeap (RtlGetProcessHeap(), 0, KeyValueInformation); + NtClose (hKey); + }else{ + DPRINT1("%s: NtOpenKey failed (Status=0x%08lx)\n", __FUNCTION__, Status); + } + return Status; +} + +/* EOF */ Property changes on: trunk/reactos/lib/smlib/lookupss.c ___________________________________________________________________ Name: svn:keywords + id author date revision Name: svn:eol-style + native _____ Modified: trunk/reactos/lib/smlib/smlib.xml --- trunk/reactos/lib/smlib/smlib.xml 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/lib/smlib/smlib.xml 2005-06-02 13:17:37 UTC (rev 15729) @@ -4,4 +4,5 @@ <file>connect.c</file> <file>execpgm.c</file> <file>compses.c</file> + <file>lookupss.c</file> </module> _____ Modified: trunk/reactos/subsys/csrss/csrss.c --- trunk/reactos/subsys/csrss/csrss.c 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/subsys/csrss/csrss.c 2005-06-02 13:17:37 UTC (rev 15729) @@ -52,6 +52,8 @@ } COMMAND_LINE_ARGUMENT, *PCOMMAND_LINE_ARGUMENT; +PRTL_USER_PROCESS_PARAMETERS RtlProcessParameters = NULL; + /********************************************************************** * NAME PRIVATE * CsrpParseCommandLine/3 @@ -150,7 +152,6 @@ VOID STDCALL NtProcessStartup(PPEB Peb) { - PRTL_USER_PROCESS_PARAMETERS RtlProcessParameters = NULL; COMMAND_LINE_ARGUMENT CmdLineArg = {0}; NTSTATUS Status = STATUS_SUCCESS; _____ Modified: trunk/reactos/subsys/csrss/init.c --- trunk/reactos/subsys/csrss/init.c 2005-06-02 13:10:57 UTC (rev 15728) +++ trunk/reactos/subsys/csrss/init.c 2005-06-02 13:17:37 UTC (rev 15729) @@ -34,6 +34,7 @@ UNICODE_STRING CsrDirectoryName; extern HANDLE CsrssApiHeap; +extern PRTL_USER_PROCESS_PARAMETERS RtlProcessParameters; static unsigned InitCompleteProcCount; static CSRPLUGIN_INIT_COMPLETE_PROC *InitCompleteProcs = NULL; @@ -306,7 +307,7 @@ /* === INIT ROUTINES === */ /********************************************************************** - * CsrpCreateCallbackPort/0 + * CsrpCreateHeap/2 */ static NTSTATUS CsrpCreateHeap (ULONG argc, PWSTR* argv) @@ -327,7 +328,7 @@ } /********************************************************************** - * CsrpCreateCallbackPort/0 + * CsrpCreateCallbackPort/2 */ static NTSTATUS CsrpCreateCallbackPort (ULONG argc, PWSTR* argv) @@ -401,9 +402,49 @@ } /********************************************************************** - * CsrpCreateApiPort/0 + * CsrpLoadKernelModeDriver/2 */ static NTSTATUS +CsrpLoadKernelModeDriver (ULONG argc, PWSTR* argv) +{ + NTSTATUS Status = STATUS_SUCCESS; + WCHAR Data [MAX_PATH + 1]; + ULONG DataLength = sizeof Data; + ULONG DataType = 0; + + + DPRINT("SM: %s called\n", __FUNCTION__); + + Status = SmLookupSubsystem (L"Kmode", + Data, + & DataLength, + & DataType, + RtlProcessParameters->Environment); + if((STATUS_SUCCESS == Status) && (DataLength > sizeof Data[0])) + { + WCHAR ImagePath [MAX_PATH + 1] = {0}; + SYSTEM_LOAD_AND_CALL_IMAGE ImageInfo; + + wcscpy (ImagePath, L"\\??\\"); + wcscat (ImagePath, Data); + RtlZeroMemory (& ImageInfo, sizeof ImageInfo); + RtlInitUnicodeString (& ImageInfo.ModuleName, ImagePath); + Status = NtSetSystemInformation(SystemLoadAndCallImage, + & ImageInfo, + sizeof ImageInfo); + if(!NT_SUCCESS(Status)) + { + DPRINT("WIN: %s: loading Kmode failed (Status=0x%08lx)\n", + __FUNCTION__, Status); + } + } + return Status; +} + +/********************************************************************** + * CsrpCreateApiPort/2 + */ +static NTSTATUS CsrpCreateApiPort (ULONG argc, PWSTR* argv) { DPRINT("CSR: %s called\n", __FUNCTION__); @@ -495,16 +536,17 @@ CSR_INIT_ROUTINE EntryPoint; PCHAR ErrorMessage; } InitRoutine [] = { - {TRUE, CsrpCreateCallbackPort, "create the callback port \\Windows\\SbApiPort"}, - {TRUE, CsrpRegisterSubsystem, "register with SM"}, - {TRUE, CsrpCreateHeap, "create the CSR heap"}, - {TRUE, CsrpCreateApiPort, "create the api port \\Windows\\ApiPort"}, - {TRUE, CsrpParseCommandLine, "parse the command line"}, - {TRUE, CsrpInitVideo, "initialize video"}, - {TRUE, CsrpApiRegisterDef, "initialize api definitions"}, - {TRUE, CsrpCCTS, "connect client to server"}, - {TRUE, CsrpInitWin32Csr, "load usermode dll"}, - {TRUE, CsrpRunWinlogon, "run WinLogon"}, + {TRUE, CsrpCreateCallbackPort, "create the callback port \\Windows\\SbApiPort"}, + {TRUE, CsrpRegisterSubsystem, "register with SM"}, + {TRUE, CsrpCreateHeap, "create the CSR heap"}, + {TRUE, CsrpCreateApiPort, "create the api port \\Windows\\ApiPort"}, + {TRUE, CsrpParseCommandLine, "parse the command line"}, + {TRUE, CsrpLoadKernelModeDriver, "load Kmode driver"}, + {TRUE, CsrpInitVideo, "initialize video"}, + {TRUE, CsrpApiRegisterDef, "initialize api definitions"}, + {TRUE, CsrpCCTS, "connect client to server"}, + {TRUE, CsrpInitWin32Csr, "load usermode dll"}, + {TRUE, CsrpRunWinlogon, "run WinLogon"}, }; /********************************************************************** Property changes on: trunk/reactos/subsys/smss/client.c ___________________________________________________________________ Name: eol-style + native Property changes on: trunk/reactos/subsys/smss/debug.c ___________________________________________________________________ Name: author + client.c Name: id + client.c Name: date + client.c Name: eol-style + native Name: revision + client.c Property changes on: trunk/reactos/subsys/smss/init.c ___________________________________________________________________ Name: author + client.c Name: id + client.c Name: date + client.c Name: eol-style + native Name: revision + client.c Property changes on: trunk/reactos/subsys/smss/initdosdev.c ___________________________________________________________________ Name: author + client.c Name: id + client.c Name: date + client.c Name: eol-style + native Name: revision + client.c Property changes on: trunk/reactos/subsys/smss/initenv.c ___________________________________________________________________ Name: author + client.c Name: id + client.c Name: date + client.c Name: eol-style + native Name: revision + client.c Property changes on: trunk/reactos/subsys/smss/initheap.c ___________________________________________________________________ Name: author + client.c Name: id + client.c Name: date + client.c Name: eol-style + native Name: revision + client.c Property changes on: trunk/reactos/subsys/smss/initmv.c ___________________________________________________________________ Name: author + client.c Name: id + client.c Name: date + client.c Name: eol-style + native Name: revision + client.c Property changes on: trunk/reactos/subsys/smss/initobdir.c ___________________________________________________________________ Name: author + client.c Name: id + client.c Name: date + client.c Name: eol-style + native [truncated at 1000 lines; 376 more skipped]
19 years, 6 months
1
0
0
0
[ea] 15728: Correct midimap location.
by ea@svn.reactos.com
Correct midimap location. Modified: trunk/reactos/bootdata/packages/reactos.dff _____ Modified: trunk/reactos/bootdata/packages/reactos.dff --- trunk/reactos/bootdata/packages/reactos.dff 2005-06-02 03:21:17 UTC (rev 15727) +++ trunk/reactos/bootdata/packages/reactos.dff 2005-06-02 13:10:57 UTC (rev 15728) @@ -97,7 +97,7 @@ lib\kernel32\kernel32.dll 1 lib\lzexpand\lz32.dll 1 lib\mesa32\mesa32.dll 1 -lib\midimap\midimap.dll 1 +lib\winmm\midimap\midimap.dll 1 lib\mmdrv\mmdrv.dll 1 lib\mpr\mpr.dll 1 lib\msacm\msacm32.dll 1
19 years, 6 months
1
0
0
0
[ion] 15727: Fix midimap/wavemap build
by ion@svn.reactos.com
Fix midimap/wavemap build Modified: trunk/reactos/baseaddress.xml Modified: trunk/reactos/lib/directory.xml Deleted: trunk/reactos/lib/midimap/ Deleted: trunk/reactos/lib/winmm/Makefile.in Deleted: trunk/reactos/lib/winmm/Makefile.ros-template Added: trunk/reactos/lib/winmm/directory.xml Deleted: trunk/reactos/lib/winmm/midimap/Makefile.in Deleted: trunk/reactos/lib/winmm/midimap/Makefile.ros-template Deleted: trunk/reactos/lib/winmm/midimap/makefile Added: trunk/reactos/lib/winmm/midimap/midimap.xml Deleted: trunk/reactos/lib/winmm/wavemap/Makefile.in Deleted: trunk/reactos/lib/winmm/wavemap/Makefile.ros-template Deleted: trunk/reactos/lib/winmm/wavemap/makefile Added: trunk/reactos/lib/winmm/wavemap/wavemap.xml _____ Modified: trunk/reactos/baseaddress.xml --- trunk/reactos/baseaddress.xml 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/baseaddress.xml 2005-06-02 03:21:17 UTC (rev 15727) @@ -49,6 +49,7 @@ <property name="BASEADDRESS_RICHED20" value="0x76360000" /> <property name="BASEADDRESS_TWAIN_32" value="0x76380000" /> <property name="BASEADDRESS_MIDIMAP" value="0x76600000" /> +<property name="BASEADDRESS_WAVEMAP" value="0x76610000" /> <property name="BASEADDRESS_MPR" value="0x76620000" /> <property name="BASEADDRESS_SETUPAPI" value="0x76660000" /> <property name="BASEADDRESS_GDIPLUS" value="0x76a00000" /> _____ Modified: trunk/reactos/lib/directory.xml --- trunk/reactos/lib/directory.xml 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/directory.xml 2005-06-02 03:21:17 UTC (rev 15727) @@ -136,9 +136,6 @@ <directory name="mesa32"> <xi:include href="mesa32/mesa32.xml" /> </directory> -<directory name="midimap"> - <xi:include href="midimap/midimap.xml" /> -</directory> <directory name="mmdrv"> <xi:include href="mmdrv/mmdrv.xml" /> </directory> @@ -275,7 +272,7 @@ <xi:include href="wininet/wininet.xml" /> </directory> <directory name="winmm"> - <xi:include href="winmm/winmm.xml" /> + <xi:include href="winmm/directory.xml" /> </directory> <directory name="winspool"> <xi:include href="winspool/winspool.xml" /> _____ Deleted: trunk/reactos/lib/winmm/Makefile.in --- trunk/reactos/lib/winmm/Makefile.in 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/Makefile.in 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,36 +0,0 @@ -EXTRADEFS = -D_WINMM_ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = winmm.dll -IMPORTLIB = libwinmm.$(IMPLIBEXT) -IMPORTS = user32 advapi32 kernel32 ntdll -EXTRALIBS = $(LIBUNICODE) - -C_SRCS = \ - driver.c \ - joystick.c \ - lolvldrv.c \ - mci.c \ - mmio.c \ - playsound.c \ - time.c \ - winmm.c - -C_SRCS16 = \ - message16.c \ - mmsystem.c \ - sound16.c - -SPEC_SRCS16 = \ - mmsystem.spec \ - sound.spec - -RC_SRCS = winmm_res.rc - -SUBDIRS = tests - -@MAKE_DLL_RULES@ - -### Dependencies: _____ Deleted: trunk/reactos/lib/winmm/Makefile.ros-template --- trunk/reactos/lib/winmm/Makefile.ros-template 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/Makefile.ros-template 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,21 +0,0 @@ -# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ - -TARGET_NAME = winmm - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ wine.a wine_uuid.a ntdll.a - -TARGET_BASE = $(TARGET_BASE_LIB_WINMM) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Added: trunk/reactos/lib/winmm/directory.xml --- trunk/reactos/lib/winmm/directory.xml 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/directory.xml 2005-06-02 03:21:17 UTC (rev 15727) @@ -0,0 +1,7 @@ +<xi:include href="winmm.xml" /> +<directory name="midimap"> + <xi:include href="midimap/midimap.xml" /> +</directory> +<directory name="wavemap"> + <xi:include href="wavemap/wavemap.xml" /> +</directory> _____ Deleted: trunk/reactos/lib/winmm/midimap/Makefile.in --- trunk/reactos/lib/winmm/midimap/Makefile.in 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/midimap/Makefile.in 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,13 +0,0 @@ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = midimap.drv -IMPORTS = winmm user32 advapi32 kernel32 - -C_SRCS = \ - midimap.c - -@MAKE_DLL_RULES@ - -### Dependencies: _____ Deleted: trunk/reactos/lib/winmm/midimap/Makefile.ros-template --- trunk/reactos/lib/winmm/midimap/Makefile.ros-template 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/midimap/Makefile.ros-template 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,23 +0,0 @@ -# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ - -TARGET_NAME = midimap - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a - -TARGET_BASE = $(TARGET_LIB_BASE_MIDIMAP) - -TARGET_RC_SRCS = @RC_SRCS@ -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -TARGET_EXTENSION = .dll - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/winmm/midimap/makefile --- trunk/reactos/lib/winmm/midimap/makefile 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/midimap/makefile 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,9 +0,0 @@ -# $Id: makefile 8620 2004-03-10 15:22:45Z silverblade $ - -PATH_TO_TOP = ../../.. - -TARGET_TYPE = winedll - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk _____ Added: trunk/reactos/lib/winmm/midimap/midimap.xml --- trunk/reactos/lib/winmm/midimap/midimap.xml 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/midimap/midimap.xml 2005-06-02 03:21:17 UTC (rev 15727) @@ -0,0 +1,22 @@ +<module name="midimap" type="win32dll" baseaddress="${BASEADDRESS_MIDIMAP}" installbase="system32" installname="midimap.dll" warnings="true"> + <importlibrary definition="midimap.spec.def" /> + <include base="midimap">.</include> + <include base="ReactOS">include/wine</include> + <define name="UNICODE" /> + <define name="_UNICODE" /> + <define name="__REACTOS__" /> + <define name="__USE_W32API" /> + <define name="_WIN32_IE">0x600</define> + <define name="_WIN32_WINNT">0x501</define> + <define name="WINVER">0x501</define> + <library>wine</library> + <library>uuid</library> + <library>ntdll</library> + <library>kernel32</library> + <library>advapi32</library> + <library>user32</library> + <library>winmm</library> + <file>midimap.c</file> + <file>midimap.rc</file> + <file>midimap.spec</file> +</module> _____ Deleted: trunk/reactos/lib/winmm/wavemap/Makefile.in --- trunk/reactos/lib/winmm/wavemap/Makefile.in 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/wavemap/Makefile.in 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,13 +0,0 @@ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../../.. -SRCDIR = @srcdir@ -VPATH = @srcdir@ -MODULE = msacm.drv -IMPORTS = msacm32 winmm user32 kernel32 - -C_SRCS = \ - wavemap.c - -@MAKE_DLL_RULES@ - -### Dependencies: _____ Deleted: trunk/reactos/lib/winmm/wavemap/Makefile.ros-template --- trunk/reactos/lib/winmm/wavemap/Makefile.ros-template 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/wavemap/Makefile.ros-template 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,23 +0,0 @@ -# $Id: Makefile.ros-template 11910 2004-12-03 23:37:44Z blight $ - -TARGET_NAME = msacm - -TARGET_OBJECTS = @C_SRCS@ - -TARGET_CFLAGS = @EXTRADEFS@ -D__REACTOS__ - -TARGET_SDKLIBS = @IMPORTS@ winmm.a wine.a wine_uuid.a ntdll.a - -TARGET_BASE = 0x76160000 - -TARGET_RC_SRCS = wavemap.rc -TARGET_RC_BINSRC = @RC_BINSRC@ -TARGET_RC_BINARIES = @RC_BINARIES@ - -TARGET_EXTENSION = .drv - -default: all - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(TOOLS_PATH)/depend.mk _____ Deleted: trunk/reactos/lib/winmm/wavemap/makefile --- trunk/reactos/lib/winmm/wavemap/makefile 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/wavemap/makefile 2005-06-02 03:21:17 UTC (rev 15727) @@ -1,9 +0,0 @@ -# $Id: makefile 8620 2004-03-10 15:22:45Z silverblade $ - -PATH_TO_TOP = ../../.. - -TARGET_TYPE = winedll - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk _____ Added: trunk/reactos/lib/winmm/wavemap/wavemap.xml --- trunk/reactos/lib/winmm/wavemap/wavemap.xml 2005-06-02 02:12:48 UTC (rev 15726) +++ trunk/reactos/lib/winmm/wavemap/wavemap.xml 2005-06-02 03:21:17 UTC (rev 15727) @@ -0,0 +1,23 @@ +<module name="wavemap" type="win32dll" baseaddress="${BASEADDRESS_WAVEMAP}" installbase="system32" installname="wavemap.dll" warnings="true"> + <importlibrary definition="msacm.spec.def" /> + <include base="wavemap">.</include> + <include base="ReactOS">include/wine</include> + <define name="UNICODE" /> + <define name="_UNICODE" /> + <define name="__REACTOS__" /> + <define name="__USE_W32API" /> + <define name="_WIN32_IE">0x600</define> + <define name="_WIN32_WINNT">0x501</define> + <define name="WINVER">0x501</define> + <library>wine</library> + <library>msacm32</library> + <library>uuid</library> + <library>ntdll</library> + <library>kernel32</library> + <library>advapi32</library> + <library>user32</library> + <library>winmm</library> + <file>wavemap.c</file> + <file>wavemap.rc</file> + <file>msacm.spec</file> +</module>
19 years, 6 months
1
0
0
0
[sedwards] 15726: this was moved
by sedwards@svn.reactos.com
this was moved Deleted: trunk/rosapps/calc/
19 years, 6 months
1
0
0
0
[jimtabor] 15725: Removed makefiles.
by jimtabor@svn.reactos.com
Removed makefiles. Deleted: trunk/reactos/drivers/usb/cromwell/core/makefile Deleted: trunk/reactos/drivers/usb/cromwell/host/makefile Deleted: trunk/reactos/drivers/usb/cromwell/uhci/makefile _____ Deleted: trunk/reactos/drivers/usb/cromwell/core/makefile --- trunk/reactos/drivers/usb/cromwell/core/makefile 2005-06-02 01:36:20 UTC (rev 15724) +++ trunk/reactos/drivers/usb/cromwell/core/makefile 2005-06-02 01:37:38 UTC (rev 15725) @@ -1,5 +0,0 @@ -# This file is automatically generated. - -TOP = ../../../.. -DEFAULT = usbcore -include $(TOP)/proxy.mak _____ Deleted: trunk/reactos/drivers/usb/cromwell/host/makefile --- trunk/reactos/drivers/usb/cromwell/host/makefile 2005-06-02 01:36:20 UTC (rev 15724) +++ trunk/reactos/drivers/usb/cromwell/host/makefile 2005-06-02 01:37:38 UTC (rev 15725) @@ -1,5 +0,0 @@ -# This file is automatically generated. - -TOP = ../../../.. -DEFAULT = ohci -include $(TOP)/proxy.mak _____ Deleted: trunk/reactos/drivers/usb/cromwell/uhci/makefile --- trunk/reactos/drivers/usb/cromwell/uhci/makefile 2005-06-02 01:36:20 UTC (rev 15724) +++ trunk/reactos/drivers/usb/cromwell/uhci/makefile 2005-06-02 01:37:38 UTC (rev 15725) @@ -1,5 +0,0 @@ -# This file is automatically generated. - -TOP = ../../../.. -DEFAULT = uhci -include $(TOP)/proxy.mak
19 years, 6 months
1
0
0
0
[jimtabor] 15724: Fixed xml problem.
by jimtabor@svn.reactos.com
Fixed xml problem. Modified: trunk/reactos/drivers/usb/cromwell/core/makefile Modified: trunk/reactos/drivers/usb/cromwell/core/usbcore.xml Modified: trunk/reactos/drivers/usb/cromwell/host/host.xml Modified: trunk/reactos/drivers/usb/cromwell/host/makefile Added: trunk/reactos/drivers/usb/cromwell/sys/sys.xml Modified: trunk/reactos/drivers/usb/cromwell/uhci/makefile Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml _____ Modified: trunk/reactos/drivers/usb/cromwell/core/makefile --- trunk/reactos/drivers/usb/cromwell/core/makefile 2005-06-02 01:36:07 UTC (rev 15723) +++ trunk/reactos/drivers/usb/cromwell/core/makefile 2005-06-02 01:36:20 UTC (rev 15724) @@ -1,25 +1,5 @@ -PATH_TO_TOP = ../../../.. +# This file is automatically generated. -TARGET_TYPE = export_driver - -TARGET_NAME = usbcore - -TARGET_DDKLIBS = ntoskrnl.a - -TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -DDEBUG_MODE - -TARGET_OBJECTS = \ - message.o hcd.o hcd-pci.o hub.o usb.o config.o urb.o \ - buffer_simple.o usb-debug.o ../sys/ros_wrapper.o \ - ../sys/linuxwrapper.o usbcore.o - -TARGET_LIBS = \ - $(PATH_TO_TOP)/dk/nkm/lib/libusbcore.a - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk - -# Automatic dependency tracking -DEP_OBJECTS := $(TARGET_OBJECTS) -include $(PATH_TO_TOP)/tools/depend.mk +TOP = ../../../.. +DEFAULT = usbcore +include $(TOP)/proxy.mak _____ Modified: trunk/reactos/drivers/usb/cromwell/core/usbcore.xml --- trunk/reactos/drivers/usb/cromwell/core/usbcore.xml 2005-06-02 01:36:07 UTC (rev 15723) +++ trunk/reactos/drivers/usb/cromwell/core/usbcore.xml 2005-06-02 01:36:20 UTC (rev 15724) @@ -3,6 +3,7 @@ <define name="__USE_W32API" /> <define name="DEBUG_MODE" /> <include base="ntoskrnl">include</include> + <library>sys_base</library> <library>ntoskrnl</library> <library>hal</library> <file>message.c</file> @@ -14,8 +15,6 @@ <file>urb.c</file> <file>buffer_simple.c</file> <file>usb-debug.c</file> - <file>../sys/ros_wrapper.c</file> - <file>../sys/linuxwrapper.c</file> <file>usbcore.c</file> <file>usbcore.rc</file> </module> _____ Modified: trunk/reactos/drivers/usb/cromwell/host/host.xml --- trunk/reactos/drivers/usb/cromwell/host/host.xml 2005-06-02 01:36:07 UTC (rev 15723) +++ trunk/reactos/drivers/usb/cromwell/host/host.xml 2005-06-02 01:36:20 UTC (rev 15724) @@ -4,12 +4,11 @@ <define name="DEBUG_MODE" /> <include base="ntoskrnl">include</include> <include>../linux</include> + <library>sys_base</library> <library>ntoskrnl</library> <library>hal</library> <library>usbcore</library> <file>ohci-hcd.c</file> - <file>../sys/ros_wrapper.c</file> - <file>../sys/linuxwrapper.c</file> <file>ohci_main.c</file> <file>ohci.rc</file> </module> _____ Modified: trunk/reactos/drivers/usb/cromwell/host/makefile --- trunk/reactos/drivers/usb/cromwell/host/makefile 2005-06-02 01:36:07 UTC (rev 15723) +++ trunk/reactos/drivers/usb/cromwell/host/makefile 2005-06-02 01:36:20 UTC (rev 15724) @@ -1,20 +1,5 @@ -PATH_TO_TOP = ../../../.. +# This file is automatically generated. -TARGET_TYPE = export_driver - -TARGET_NAME = ohci - -TARGET_DDKLIBS = ntoskrnl.a usbcore.a - -TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -DDEBUG_MODE - -TARGET_OBJECTS = \ - ohci-hcd.o ohci_main.o ../sys/ros_wrapper.o ../sys/linuxwrapper.o - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk - -# Automatic dependency tracking -DEP_OBJECTS := $(TARGET_OBJECTS) -include $(PATH_TO_TOP)/tools/depend.mk +TOP = ../../../.. +DEFAULT = ohci +include $(TOP)/proxy.mak _____ Added: trunk/reactos/drivers/usb/cromwell/sys/sys.xml --- trunk/reactos/drivers/usb/cromwell/sys/sys.xml 2005-06-02 01:36:07 UTC (rev 15723) +++ trunk/reactos/drivers/usb/cromwell/sys/sys.xml 2005-06-02 01:36:20 UTC (rev 15724) @@ -0,0 +1,7 @@ +<module name="sys_base" type="objectlibrary"> + <define name="__USE_W32API" /> + <define name="DEBUG_MODE" /> + <include base="ntoskrnl">include</include> + <file>ros_wrapper.c</file> + <file>linuxwrapper.c</file> +</module> \ No newline at end of file _____ Modified: trunk/reactos/drivers/usb/cromwell/uhci/makefile --- trunk/reactos/drivers/usb/cromwell/uhci/makefile 2005-06-02 01:36:07 UTC (rev 15723) +++ trunk/reactos/drivers/usb/cromwell/uhci/makefile 2005-06-02 01:36:20 UTC (rev 15724) @@ -1,16 +1,5 @@ -PATH_TO_TOP = ../../../.. +# This file is automatically generated. -TARGET_TYPE = export_driver - -TARGET_NAME = uhci - -TARGET_DDKLIBS = ntoskrnl.a usbcore.a - -TARGET_CFLAGS = -Wall -I$(PATH_TO_TOP)/ntoskrnl/include -DDEBUG_MODE - -TARGET_OBJECTS = \ - uhci-hcd.o uhci_main.o ../sys/ros_wrapper.o ../sys/linuxwrapper.o - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk +TOP = ../../../.. +DEFAULT = uhci +include $(TOP)/proxy.mak _____ Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml --- trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml 2005-06-02 01:36:07 UTC (rev 15723) +++ trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml 2005-06-02 01:36:20 UTC (rev 15724) @@ -4,12 +4,11 @@ <define name="DEBUG_MODE" /> <include base="ntoskrnl">include</include> <include>../linux</include> + <library>sys_base</library> <library>ntoskrnl</library> <library>hal</library> <library>usbcore</library> <file>uhci-hcd.c</file> - <file>../sys/ros_wrapper.c</file> - <file>../sys/linuxwrapper.c</file> <file>uhci_main.c</file> <file>uhci.rc</file> </module>
19 years, 6 months
1
0
0
0
[jimtabor] 15723: Fixed xml problem.
by jimtabor@svn.reactos.com
Fixed xml problem. Modified: trunk/reactos/drivers/usb/cromwell/directory.xml _____ Modified: trunk/reactos/drivers/usb/cromwell/directory.xml --- trunk/reactos/drivers/usb/cromwell/directory.xml 2005-06-01 23:09:36 UTC (rev 15722) +++ trunk/reactos/drivers/usb/cromwell/directory.xml 2005-06-02 01:36:07 UTC (rev 15723) @@ -1,9 +1,12 @@ -<directory name="core"> - <xi:include href="core/usbcore.xml" /> -</directory> -<directory name="host"> - <xi:include href="host/host.xml" /> -</directory> -<directory name="uhci"> - <xi:include href="uhci/uhci.xml" /> -</directory> +<directory name="sys"> + <xi:include href="sys/sys.xml" /> +</directory> +<directory name="core"> + <xi:include href="core/usbcore.xml" /> +</directory> +<directory name="host"> + <xi:include href="host/host.xml" /> +</directory> +<directory name="uhci"> + <xi:include href="uhci/uhci.xml" /> +</directory> \ No newline at end of file
19 years, 6 months
1
0
0
0
[hpoussin] 15722: Don't close port if opening failed
by hpoussin@svn.reactos.com
Don't close port if opening failed Modified: trunk/reactos/drivers/bus/serenum/detect.c _____ Modified: trunk/reactos/drivers/bus/serenum/detect.c --- trunk/reactos/drivers/bus/serenum/detect.c 2005-06-01 21:57:52 UTC (rev 15721) +++ trunk/reactos/drivers/bus/serenum/detect.c 2005-06-01 23:09:36 UTC (rev 15722) @@ -484,7 +484,7 @@ /* Open port */ Status = SerenumSendIrp(LowerDevice, IRP_MJ_CREATE); - if (!NT_SUCCESS(Status)) goto ByeBye; + if (!NT_SUCCESS(Status)) return Status; /* Reset UART */ CHECKPOINT;
19 years, 6 months
1
0
0
0
[ekohl] 15721: - Start the logging thread from ServiceMain.
by ekohl@svn.reactos.com
- Start the logging thread from ServiceMain. - Move UNICODE definition to the configuration file. - Code cleanup. Modified: trunk/reactos/services/eventlog/eventlog.c Modified: trunk/reactos/services/eventlog/logport.c _____ Modified: trunk/reactos/services/eventlog/eventlog.c --- trunk/reactos/services/eventlog/eventlog.c 2005-06-01 21:55:36 UTC (rev 15720) +++ trunk/reactos/services/eventlog/eventlog.c 2005-06-01 21:57:52 UTC (rev 15721) @@ -1,6 +1,6 @@ /* * ReactOS kernel - * Copyright (C) 2002 ReactOS Team + * Copyright (C) 2002, 2005 ReactOS Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: services/eventlog/eventlog.c @@ -27,8 +26,6 @@ /* INCLUDES *****************************************************************/ -#define UNICODE - #define NTOS_MODE_USER #include <ntos.h> #include <windows.h> @@ -40,9 +37,17 @@ #include <debug.h> +VOID CALLBACK +ServiceMain(DWORD argc, LPTSTR *argv); + /* GLOBALS ******************************************************************/ +SERVICE_TABLE_ENTRY ServiceTable[2] = +{ + {L"EventLog", (LPSERVICE_MAIN_FUNCTION)ServiceMain}, + {NULL, NULL} +}; /* FUNCTIONS *****************************************************************/ @@ -53,6 +58,10 @@ { DPRINT("ServiceMain() called\n"); + if (StartPortThread() == FALSE) + { + DPRINT("StartPortThread() failed\n"); + } DPRINT("ServiceMain() done\n"); } @@ -61,37 +70,15 @@ int main(int argc, char *argv[]) { - SERVICE_TABLE_ENTRY ServiceTable[2] = {{L"EventLog", (LPSERVICE_MAIN_FUNCTION)ServiceMain}, - {NULL, NULL}}; + DPRINT("main() called\n"); - HANDLE hEvent; -// NTSTATUS Status; - - DPRINT("EventLog started\n"); - - - - - StartServiceCtrlDispatcher(ServiceTable); - DPRINT("StartServiceCtrlDispatcher() done\n"); + DPRINT("main() done\n"); - if (StartPortThread() == FALSE) - { - DPRINT1("StartPortThread() failed\n"); - } - - DPRINT("EventLog waiting\n"); - - hEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - WaitForSingleObject(hEvent, INFINITE); - - DPRINT("EventLog done\n"); - ExitThread(0); - return(0); + return 0; } /* EOF */ _____ Modified: trunk/reactos/services/eventlog/logport.c --- trunk/reactos/services/eventlog/logport.c 2005-06-01 21:55:36 UTC (rev 15720) +++ trunk/reactos/services/eventlog/logport.c 2005-06-01 21:57:52 UTC (rev 15721) @@ -16,8 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id$ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel * FILE: services/eventlog/logport.c @@ -27,8 +26,6 @@ /* INCLUDES *****************************************************************/ -#define UNICODE - #define NTOS_MODE_USER #include <ntos.h> #include <windows.h> @@ -50,7 +47,7 @@ /* FUNCTIONS ****************************************************************/ static NTSTATUS -InitLogPort (VOID) +InitLogPort(VOID) { OBJECT_ATTRIBUTES ObjectAttributes; UNICODE_STRING PortName; @@ -93,27 +90,27 @@ TRUE, NULL, NULL); - if (!NT_SUCCESS (Status)) + if (!NT_SUCCESS(Status)) { DPRINT1("NtAcceptConnectPort() failed (Status %lx)\n", Status); goto ByeBye; } - Status = NtCompleteConnectPort (MessagePortHandle); - if (!NT_SUCCESS (Status)) + Status = NtCompleteConnectPort(MessagePortHandle); + if (!NT_SUCCESS(Status)) { DPRINT1("NtCompleteConnectPort() failed (Status %lx)\n", Status); goto ByeBye; } ByeBye: - if (!NT_SUCCESS (Status)) + if (!NT_SUCCESS(Status)) { if (ConnectPortHandle != NULL) - NtClose (ConnectPortHandle); + NtClose(ConnectPortHandle); if (MessagePortHandle != NULL) - NtClose (MessagePortHandle); + NtClose(MessagePortHandle); } return Status; @@ -148,40 +145,40 @@ break; } - DPRINT ("Received message\n"); + DPRINT("Received message\n"); if (Request.Header.MessageType == LPC_PORT_CLOSED) { - DPRINT ("Port closed\n"); + DPRINT("Port closed\n"); - return (STATUS_UNSUCCESSFUL); + return STATUS_SUCCESS; } if (Request.Header.MessageType == LPC_REQUEST) { - DPRINT ("Received request\n"); + DPRINT("Received request\n"); } else if (Request.Header.MessageType == LPC_DATAGRAM) { - DPRINT ("Received datagram\n"); + DPRINT("Received datagram\n"); Message = (PIO_ERROR_LOG_MESSAGE)&Request.Data; - DPRINT ("Message->Type %hx\n", Message->Type); - DPRINT ("Message->Size %hu\n", Message->Size); + DPRINT("Message->Type %hx\n", Message->Type); + DPRINT("Message->Size %hu\n", Message->Size); //#ifndef NDEBUG - DbgPrint ("\n Error mesage:\n"); - DbgPrint ("Error code: %lx\n", Message->EntryData.ErrorCode); - DbgPrint ("Retry count: %u\n", Message->EntryData.RetryCount); - DbgPrint ("Sequence number: %lu\n", Message->EntryData.SequenceNumber); + DbgPrint("\n Error mesage:\n"); + DbgPrint("Error code: %lx\n", Message->EntryData.ErrorCode); + DbgPrint("Retry count: %u\n", Message->EntryData.RetryCount); + DbgPrint("Sequence number: %lu\n", Message->EntryData.SequenceNumber); if (Message->DriverNameLength != 0) { - DbgPrint ("Driver name: %.*S\n", - Message->DriverNameLength / sizeof(WCHAR), - (PWCHAR)((ULONG_PTR)Message + Message->DriverNameOffset)); + DbgPrint("Driver name: %.*S\n", + Message->DriverNameLength / sizeof(WCHAR), + (PWCHAR)((ULONG_PTR)Message + Message->DriverNameOffset)); } if (Message->EntryData.NumberOfStrings != 0) @@ -189,13 +186,16 @@ p = (PWSTR)((ULONG_PTR)&Message->EntryData + Message->EntryData.StringOffset); for (i = 0; i < Message->EntryData.NumberOfStrings; i++) { - DbgPrint ("String %lu: %S\n", i, p); + DbgPrint("String %lu: %S\n", i, p); p += wcslen(p) + 1; } DbgPrint("\n"); } //#endif + + /* FIXME: Enqueue message */ + } } @@ -210,7 +210,7 @@ Status = InitLogPort(); if (!NT_SUCCESS(Status)) - return(Status); + return Status; while (NT_SUCCESS(Status)) { @@ -218,12 +218,12 @@ } if (ConnectPortHandle != NULL) - NtClose (ConnectPortHandle); + NtClose(ConnectPortHandle); if (MessagePortHandle != NULL) - NtClose (MessagePortHandle); + NtClose(MessagePortHandle); - return(Status); + return Status; } @@ -239,7 +239,7 @@ 0, &ThreadId); - return((PortThreadHandle != NULL)); + return (PortThreadHandle != NULL); } /* EOF */
19 years, 6 months
1
0
0
0
[jimtabor] 15720: Adding Cromwell to usb.
by jimtabor@svn.reactos.com
Adding Cromwell to usb. Modified: trunk/reactos/drivers/usb/cromwell/core/config.c Modified: trunk/reactos/drivers/usb/cromwell/core/hcd.h Modified: trunk/reactos/drivers/usb/cromwell/core/hub.c Modified: trunk/reactos/drivers/usb/cromwell/core/message.c Modified: trunk/reactos/drivers/usb/cromwell/core/usb-debug.c Modified: trunk/reactos/drivers/usb/cromwell/core/usb.c Added: trunk/reactos/drivers/usb/cromwell/core/usbcore.xml Added: trunk/reactos/drivers/usb/cromwell/directory.xml Added: trunk/reactos/drivers/usb/cromwell/host/host.xml Modified: trunk/reactos/drivers/usb/cromwell/host/ohci_main.c Modified: trunk/reactos/drivers/usb/cromwell/host/ohci_main.h Modified: trunk/reactos/drivers/usb/cromwell/linux/usb.h Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci-hcd.c Added: trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci_main.c Modified: trunk/reactos/drivers/usb/cromwell/usb_wrapper.h _____ Modified: trunk/reactos/drivers/usb/cromwell/core/config.c --- trunk/reactos/drivers/usb/cromwell/core/config.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/core/config.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -101,56 +101,56 @@ return parsed; } -static int usb_parse_interface(struct usb_interface *interface, unsigned char *buffer, int size) +static int usb_parse_interface(struct usb_interface *pinterface, unsigned char *buffer, int size) { int i, len, numskipped, retval, parsed = 0; struct usb_descriptor_header *header; struct usb_host_interface *ifp; unsigned char *begin; - interface->act_altsetting = 0; - interface->num_altsetting = 0; - interface->max_altsetting = USB_ALTSETTINGALLOC; - device_initialize(&interface->dev); + pinterface->act_altsetting = 0; + pinterface->num_altsetting = 0; + pinterface->max_altsetting = USB_ALTSETTINGALLOC; + device_initialize(&pinterface->dev); - interface->altsetting = kmalloc(sizeof(*interface->altsetting) * interface->max_altsetting, + pinterface->altsetting = kmalloc(sizeof(*pinterface->altsetting) * pinterface->max_altsetting, GFP_KERNEL); - if (!interface->altsetting) { - err("couldn't kmalloc interface->altsetting"); + if (!pinterface->altsetting) { + err("couldn't kmalloc pinterface->altsetting"); return -1; } while (size > 0) { struct usb_interface_descriptor *d; - if (interface->num_altsetting >= interface->max_altsetting) { + if (pinterface->num_altsetting >= pinterface->max_altsetting) { struct usb_host_interface *ptr; int oldmas; - oldmas = interface->max_altsetting; - interface->max_altsetting += USB_ALTSETTINGALLOC; - if (interface->max_altsetting > USB_MAXALTSETTING) { + oldmas = pinterface->max_altsetting; + pinterface->max_altsetting += USB_ALTSETTINGALLOC; + if (pinterface->max_altsetting > USB_MAXALTSETTING) { warn("too many alternate settings (incr %d max %d)\n", USB_ALTSETTINGALLOC, USB_MAXALTSETTING); return -1; } - ptr = kmalloc(sizeof(*ptr) * interface->max_altsetting, GFP_KERNEL); + ptr = kmalloc(sizeof(*ptr) * pinterface->max_altsetting, GFP_KERNEL); if (ptr == NULL) { - err("couldn't kmalloc interface->altsetting"); + err("couldn't kmalloc pinterface->altsetting"); return -1; } - memcpy(ptr, interface->altsetting, sizeof(*interface->altsetting) * oldmas); - kfree(interface->altsetting); - interface->altsetting = ptr; + memcpy(ptr, pinterface->altsetting, sizeof(*pinterface->altsetting) * oldmas); + kfree(pinterface->altsetting); + pinterface->altsetting = ptr; } - ifp = interface->altsetting + interface->num_altsetting; + ifp = pinterface->altsetting + pinterface->num_altsetting; ifp->endpoint = NULL; ifp->extra = NULL; ifp->extralen = 0; - interface->num_altsetting++; + pinterface->num_altsetting++; memcpy(ifp, buffer, USB_DT_INTERFACE_SIZE); @@ -268,16 +268,16 @@ return -1; } - config->interface = (struct usb_interface *) + config->pinterface = (struct usb_interface *) kmalloc(config->desc.bNumInterfaces * sizeof(struct usb_interface), GFP_KERNEL); - dbg("kmalloc IF %p, numif %i", config->interface, config->desc.bNumInterfaces); - if (!config->interface) { + dbg("kmalloc IF %p, numif %i", config->pinterface, config->desc.bNumInterfaces); + if (!config->pinterface) { err("out of memory"); return -1; } - memset(config->interface, 0, + memset(config->pinterface, 0, config->desc.bNumInterfaces * sizeof(struct usb_interface)); buffer += config->desc.bLength; @@ -337,7 +337,7 @@ } } - retval = usb_parse_interface(config->interface + i, buffer, size); + retval = usb_parse_interface(config->pinterface + i, buffer, size); if (retval < 0) return retval; @@ -367,12 +367,12 @@ for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { struct usb_host_config *cf = &dev->config[c]; - if (!cf->interface) + if (!cf->pinterface) break; for (i = 0; i < cf->desc.bNumInterfaces; i++) { struct usb_interface *ifp = - &cf->interface[i]; + &cf->pinterface[i]; if (!ifp->altsetting) break; @@ -398,7 +398,7 @@ kfree(ifp->altsetting); } - kfree(cf->interface); + kfree(cf->pinterface); } kfree(dev->config); } _____ Modified: trunk/reactos/drivers/usb/cromwell/core/hcd.h --- trunk/reactos/drivers/usb/cromwell/core/hcd.h 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/core/hcd.h 2005-06-01 21:55:36 UTC (rev 15720) @@ -424,7 +424,7 @@ extern void usb_bus_put (struct usb_bus *bus); extern int usb_find_interface_driver (struct usb_device *dev, - struct usb_interface *interface); + struct usb_interface *pinterface); #define usb_endpoint_halt(dev, ep, out) ((dev)->halted[out] |= (1 << (ep))) _____ Modified: trunk/reactos/drivers/usb/cromwell/core/hub.c --- trunk/reactos/drivers/usb/cromwell/core/hub.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/core/hub.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -42,8 +42,8 @@ #endif /* Wakes up khubd */ -static spinlock_t hub_event_lock = SPIN_LOCK_UNLOCKED; -static DECLARE_MUTEX(usb_address0_sem); +//static spinlock_t hub_event_lock = SPIN_LOCK_UNLOCKED; +//static DECLARE_MUTEX(usb_address0_sem); static LIST_HEAD(hub_event_list); /* List of hubs needing servicing */ static LIST_HEAD(hub_list); /* List of all hubs (for cleanup) */ @@ -67,7 +67,7 @@ /* for dev_info, dev_dbg, etc */ static inline struct device *hubdev (struct usb_device *dev) { - return &dev->actconfig->interface [0].dev; + return &dev->actconfig->pinterface [0].dev; } /* USB 2.0 spec Section 11.24.4.5 */ @@ -699,7 +699,7 @@ static int hub_port_status(struct usb_device *dev, int port, u16 *status, u16 *change) { - struct usb_hub *hub = usb_get_intfdata (dev->actconfig->interface); + struct usb_hub *hub = usb_get_intfdata (dev->actconfig->pinterface); int ret; ret = get_port_status(dev, port + 1, &hub->status->port); @@ -1360,7 +1360,7 @@ } for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { - struct usb_interface *intf = &dev->actconfig->interface[i]; + struct usb_interface *intf = &dev->actconfig->pinterface[i]; struct usb_interface_descriptor *as; as = &intf->altsetting[intf->act_altsetting].desc; _____ Modified: trunk/reactos/drivers/usb/cromwell/core/message.c --- trunk/reactos/drivers/usb/cromwell/core/message.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/core/message.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -683,7 +683,7 @@ /* NOTE: affects all endpoints _except_ ep0 */ for (i=0; i<dev->actconfig->desc.bNumInterfaces; i++) { - struct usb_interface *ifp = dev->actconfig->interface + i; + struct usb_interface *ifp = dev->actconfig->pinterface + i; struct usb_host_interface *as = ifp->altsetting + ifp->act_altsetting; struct usb_host_endpoint *ep = as->endpoint; int e; @@ -800,16 +800,16 @@ * Returns zero on success, or else the status code returned by the * underlying usb_control_msg() call. */ -int usb_set_interface(struct usb_device *dev, int interface, int alternate) +int usb_set_interface(struct usb_device *dev, int pinterface, int alternate) { struct usb_interface *iface; struct usb_host_interface *iface_as; int i, ret; void (*disable)(struct usb_device *, int) = dev->bus->op->disable; - iface = usb_ifnum_to_if(dev, interface); + iface = usb_ifnum_to_if(dev, pinterface); if (!iface) { - warn("selecting invalid interface %d", interface); + warn("selecting invalid interface %d", pinterface); return -EINVAL; } @@ -817,7 +817,7 @@ only has one alternate setting */ if (iface->num_altsetting == 1) { dbg("ignoring set_interface for dev %d, iface %d, alt %d", - dev->devnum, interface, alternate); + dev->devnum, pinterface, alternate); return 0; } @@ -828,7 +828,7 @@ USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, iface->altsetting[alternate] .desc.bAlternateSetting, - interface, NULL, 0, HZ * 5)) < 0) + pinterface, NULL, 0, HZ * 5)) < 0) return ret; /* FIXME drivers shouldn't need to replicate/bugfix the logic here _____ Modified: trunk/reactos/drivers/usb/cromwell/core/usb-debug.c --- trunk/reactos/drivers/usb/cromwell/core/usb-debug.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/core/usb-debug.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -42,7 +42,7 @@ usb_show_config_descriptor(&config->desc); for (i = 0; i < config->desc.bNumInterfaces; i++) { - ifp = config->interface + i; + ifp = config->pinterface + i; if (!ifp) break; _____ Modified: trunk/reactos/drivers/usb/cromwell/core/usb.c --- trunk/reactos/drivers/usb/cromwell/core/usb.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/core/usb.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -212,9 +212,9 @@ int i; for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) - if (dev->actconfig->interface[i].altsetting[0] + if (dev->actconfig->pinterface[i].altsetting[0] .desc.bInterfaceNumber == ifnum) - return &dev->actconfig->interface[i]; + return &dev->actconfig->pinterface[i]; return NULL; } @@ -239,13 +239,13 @@ int i, j, k; for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) - for (j = 0; j < dev->actconfig->interface[i].num_altsetting; j++) - for (k = 0; k < dev->actconfig->interface[i] + for (j = 0; j < dev->actconfig->pinterface[i].num_altsetting; j++) + for (k = 0; k < dev->actconfig->pinterface[i] .altsetting[j].desc.bNumEndpoints; k++) - if (epnum == dev->actconfig->interface[i] + if (epnum == dev->actconfig->pinterface[i] .altsetting[j].endpoint[k] .desc.bEndpointAddress) - return &dev->actconfig->interface[i] + return &dev->actconfig->pinterface[i] .altsetting[j].endpoint[k] .desc; @@ -391,7 +391,7 @@ * its associated class and subclass. */ const struct usb_device_id * -usb_match_id(struct usb_interface *interface, const struct usb_device_id *id) +usb_match_id(struct usb_interface *pinterface, const struct usb_device_id *id) { struct usb_host_interface *intf; struct usb_device *dev; @@ -400,8 +400,8 @@ if (id == NULL) return NULL; - intf = &interface->altsetting [interface->act_altsetting]; - dev = interface_to_usbdev(interface); + intf = &pinterface->altsetting [pinterface->act_altsetting]; + dev = interface_to_usbdev(pinterface); /* It is important to check that id->driver_info is nonzero, since an entry that is all zeroes except for a nonzero @@ -901,11 +901,11 @@ dev_dbg (&dev->dev, "unregistering interfaces\n"); if (dev->actconfig) { for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { - struct usb_interface *interface; + struct usb_interface *pinterface; /* remove this interface */ - interface = &dev->actconfig->interface[i]; - device_unregister(&interface->dev); + pinterface = &dev->actconfig->pinterface[i]; + device_unregister(&pinterface->dev); } } @@ -1205,35 +1205,35 @@ /* Register all of the interfaces for this device with the driver core. * Remember, interfaces get bound to drivers, not devices. */ for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) { - struct usb_interface *interface = &dev->actconfig->interface[i]; + struct usb_interface *pinterface = &dev->actconfig->pinterface[i]; struct usb_interface_descriptor *desc; - desc = &interface->altsetting [interface->act_altsetting].desc; - interface->dev.parent = &dev->dev; - interface->dev.driver = NULL; - interface->dev.bus = &usb_bus_type; - interface->dev.dma_mask = parent->dma_mask; - sprintf (&interface->dev.bus_id[0], "%d-%s:%d", + desc = &pinterface->altsetting [pinterface->act_altsetting].desc; + pinterface->dev.parent = &dev->dev; + pinterface->dev.driver = NULL; + pinterface->dev.bus = &usb_bus_type; + pinterface->dev.dma_mask = parent->dma_mask; + sprintf (&pinterface->dev.bus_id[0], "%d-%s:%d", dev->bus->busnum, dev->devpath, desc->bInterfaceNumber); if (!desc->iInterface || usb_string (dev, desc->iInterface, - interface->dev.name, - sizeof interface->dev.name) <= 0) { + pinterface->dev.name, + sizeof pinterface->dev.name) <= 0) { /* typically devices won't bother with interface * descriptions; this is the normal case. an * interface's driver might describe it better. * (also: iInterface is per-altsetting ...) */ - sprintf (&interface->dev.name[0], + sprintf (&pinterface->dev.name[0], "usb-%s-%s interface %d", dev->bus->bus_name, dev->devpath, desc->bInterfaceNumber); - DPRINT1("usb_new_device: %s\n", interface->dev.name); + DPRINT1("usb_new_device: %s\n", pinterface->dev.name); } - dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id); - device_add (&interface->dev); - usb_create_driverfs_intf_files (interface); + dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, pinterface->dev.bus_id); + device_add (&pinterface->dev); + usb_create_driverfs_intf_files (pinterface); } /* add a /proc/bus/usb entry */ usbfs_add_device(dev); _____ Added: trunk/reactos/drivers/usb/cromwell/core/usbcore.xml --- trunk/reactos/drivers/usb/cromwell/core/usbcore.xml 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/core/usbcore.xml 2005-06-01 21:55:36 UTC (rev 15720) @@ -0,0 +1,21 @@ +<module name="usbcore" type="kernelmodedriver" installbase="system32/drivers" installname="usbcore.sys" warnings="true"> + <importlibrary definition="usbcore.def" /> + <define name="__USE_W32API" /> + <define name="DEBUG_MODE" /> + <include base="ntoskrnl">include</include> + <library>ntoskrnl</library> + <library>hal</library> + <file>message.c</file> + <file>hcd.c</file> + <file>hcd-pci.c</file> + <file>hub.c</file> + <file>usb.c</file> + <file>config.c</file> + <file>urb.c</file> + <file>buffer_simple.c</file> + <file>usb-debug.c</file> + <file>../sys/ros_wrapper.c</file> + <file>../sys/linuxwrapper.c</file> + <file>usbcore.c</file> + <file>usbcore.rc</file> +</module> _____ Added: trunk/reactos/drivers/usb/cromwell/directory.xml --- trunk/reactos/drivers/usb/cromwell/directory.xml 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/directory.xml 2005-06-01 21:55:36 UTC (rev 15720) @@ -0,0 +1,9 @@ +<directory name="core"> + <xi:include href="core/usbcore.xml" /> +</directory> +<directory name="host"> + <xi:include href="host/host.xml" /> +</directory> +<directory name="uhci"> + <xi:include href="uhci/uhci.xml" /> +</directory> _____ Added: trunk/reactos/drivers/usb/cromwell/host/host.xml --- trunk/reactos/drivers/usb/cromwell/host/host.xml 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/host/host.xml 2005-06-01 21:55:36 UTC (rev 15720) @@ -0,0 +1,15 @@ +<module name="ohci" type="kernelmodedriver" installbase="system32/drivers" installname="ohci.sys" warnings="true"> + <importlibrary definition="ohci.def" /> + <define name="__USE_W32API" /> + <define name="DEBUG_MODE" /> + <include base="ntoskrnl">include</include> + <include>../linux</include> + <library>ntoskrnl</library> + <library>hal</library> + <library>usbcore</library> + <file>ohci-hcd.c</file> + <file>../sys/ros_wrapper.c</file> + <file>../sys/linuxwrapper.c</file> + <file>ohci_main.c</file> + <file>ohci.rc</file> +</module> _____ Modified: trunk/reactos/drivers/usb/cromwell/host/ohci_main.c --- trunk/reactos/drivers/usb/cromwell/host/ohci_main.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/host/ohci_main.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -6,7 +6,8 @@ #include <ddk/ntddk.h> #include <debug.h> -#include "../linux/linux_wrapper.h" +#include "../usb_wrapper.h" +#include "../core/hcd.h" #include "ohci_main.h" // declare basic init funcs _____ Modified: trunk/reactos/drivers/usb/cromwell/host/ohci_main.h --- trunk/reactos/drivers/usb/cromwell/host/ohci_main.h 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/host/ohci_main.h 2005-06-01 21:55:36 UTC (rev 15720) @@ -15,6 +15,7 @@ //OHCI_HW_INITIALIZATION_DATA InitializationData; PVOID HwContext; //UNICODE_STRING RegistryPath; + } OHCI_DRIVER_EXTENSION, *POHCI_DRIVER_EXTENSION; typedef struct _OHCI_DEVICE_EXTENSTION _____ Modified: trunk/reactos/drivers/usb/cromwell/linux/usb.h --- trunk/reactos/drivers/usb/cromwell/linux/usb.h 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/linux/usb.h 2005-06-01 21:55:36 UTC (rev 15720) @@ -109,10 +109,12 @@ * All standards-conformant USB devices that use isochronous endpoints * will use them in non-default settings. */ + struct usb_interface { /* array of alternate settings for this interface. * these will be in numeric order, 0..num_altsettting */ + struct usb_host_interface *altsetting; unsigned act_altsetting; /* active alternate setting */ @@ -123,7 +125,7 @@ int minor; /* minor number this interface is bound to */ struct device dev; /* interface specific device info */ struct class_device class_dev; -}; +}USB_INTERFACE, *PUSB_INTERFACE; #define to_usb_interface(d) container_of(d, struct usb_interface, dev) #define class_dev_to_usb_interface(d) container_of(d, struct usb_interface, class_dev) #define interface_to_usbdev(intf) \ @@ -148,12 +150,13 @@ */ struct usb_host_config { struct usb_config_descriptor desc; +// +// /* the interfaces associated with this configuration +// * these will be in numeric order, 0..desc.bNumInterfaces +// */ +// + struct usb_interface *pinterface; - /* the interfaces associated with this configuration - * these will be in numeric order, 0..desc.bNumInterfaces - */ - struct usb_interface *interface; - unsigned char *extra; /* Extra descriptors */ int extralen; }; @@ -289,7 +292,7 @@ extern int usb_interface_claimed(struct usb_interface *iface); extern void usb_driver_release_interface(struct usb_driver *driver, struct usb_interface *iface); -const struct usb_device_id *usb_match_id(struct usb_interface *interface, +const struct usb_device_id *usb_match_id(struct usb_interface *pinterface, const struct usb_device_id *id); extern struct usb_interface *usb_find_interface(struct usb_driver *drv, int minor); _____ Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci-hcd.c --- trunk/reactos/drivers/usb/cromwell/uhci/uhci-hcd.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/uhci/uhci-hcd.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -44,11 +44,11 @@ #include <linux/proc_fs.h> #endif -#ifdef CONFIG_USB_DEBUG +//#ifdef CONFIG_USB_DEBUG #define DEBUG -#else -#undef DEBUG -#endif +//#else +//#undef DEBUG +//#endif #if 0 #include <linux/usb.h> @@ -2615,7 +2615,7 @@ kfree(errbuf); } -module_init(uhci_hcd_init); +/*module_init(uhci_hcd_init);*/ module_exit(uhci_hcd_cleanup); MODULE_AUTHOR(DRIVER_AUTHOR); _____ Added: trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml --- trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/uhci/uhci.xml 2005-06-01 21:55:36 UTC (rev 15720) @@ -0,0 +1,15 @@ +<module name="uhci" type="kernelmodedriver" installbase="system32/drivers" installname="uhci.sys" warnings="true"> + <importlibrary definition="uhci.def" /> + <define name="__USE_W32API" /> + <define name="DEBUG_MODE" /> + <include base="ntoskrnl">include</include> + <include>../linux</include> + <library>ntoskrnl</library> + <library>hal</library> + <library>usbcore</library> + <file>uhci-hcd.c</file> + <file>../sys/ros_wrapper.c</file> + <file>../sys/linuxwrapper.c</file> + <file>uhci_main.c</file> + <file>uhci.rc</file> +</module> _____ Modified: trunk/reactos/drivers/usb/cromwell/uhci/uhci_main.c --- trunk/reactos/drivers/usb/cromwell/uhci/uhci_main.c 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/uhci/uhci_main.c 2005-06-01 21:55:36 UTC (rev 15720) @@ -5,6 +5,7 @@ */ #include <ddk/ntddk.h> +#define DEBUG #include <debug.h> // config and include core/hcd.h, for hc_device struct @@ -13,7 +14,6 @@ #include "../host/ohci_main.h" - // declare basic init funcs void init_wrapper(struct pci_dev *probe_dev); int uhci_hcd_init(void); @@ -30,7 +30,8 @@ #define USB_UHCI_TAG TAG('u','s','b','u') -NTSTATUS STDCALL AddDevice(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT pdo) +NTSTATUS STDCALL +AddDevice(PDRIVER_OBJECT DriverObject, PDEVICE_OBJECT pdo) { PDEVICE_OBJECT fdo; NTSTATUS Status; @@ -61,20 +62,21 @@ // Create a unicode device name DeviceNumber = 0; //TODO: Allocate new device number every time - swprintf(DeviceBuffer, L"\\Device\\USBFDO-%lu", DeviceNumber); + swprintf(DeviceBuffer, L"\\Device\\USBPDO-%lu", DeviceNumber); RtlInitUnicodeString(&DeviceName, DeviceBuffer); Status = IoCreateDevice(DriverObject, - sizeof(OHCI_DEVICE_EXTENSION)/* + DriverExtension->InitializationData.HwDeviceExtensionSize*/, - &DeviceName, - FILE_DEVICE_CONTROLLER, - 0, - FALSE, - &fdo); + sizeof(OHCI_DEVICE_EXTENSION), + /* + DriverExtension->InitializationData.HwDeviceExtensionSize*/ + &DeviceName, + FILE_DEVICE_CONTROLLER, + 0, + FALSE, + &fdo); if (!NT_SUCCESS(Status)) { - DPRINT("IoCreateDevice call failed with status 0x%08x\n", Status); + DPRINT1("IoCreateDevice call failed with status 0x%08x\n", Status); return Status; } @@ -93,7 +95,7 @@ /* Get bus number from the upper level bus driver. */ Size = sizeof(ULONG); - Status = IoGetDeviceProperty( +/* Status = IoGetDeviceProperty( pdo, DevicePropertyBusNumber, Size, @@ -102,15 +104,16 @@ if (!NT_SUCCESS(Status)) { - DPRINT("Couldn't get an information from bus driver. Panic!!!\n"); + DPRINT1("Couldn't get an information from bus driver. Panic!!!\n"); return Status; } - - DPRINT("Done AddDevice\n"); +*/ + DPRINT1("Done AddDevice\n"); return STATUS_SUCCESS; } -VOID STDCALL DriverUnload(PDRIVER_OBJECT DriverObject) +VOID STDCALL +DriverUnload(PDRIVER_OBJECT DriverObject) { DPRINT1("DriverUnload()\n"); @@ -127,7 +130,8 @@ uhci_hcd_cleanup(); } -NTSTATUS InitLinuxWrapper(PDEVICE_OBJECT DeviceObject) +NTSTATUS +InitLinuxWrapper(PDEVICE_OBJECT DeviceObject) { NTSTATUS Status; POHCI_DEVICE_EXTENSION DeviceExtension = (POHCI_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -153,7 +157,7 @@ // Probe device with real id now uhci_pci_driver.probe(dev, uhci_pci_ids); - DPRINT("InitLinuxWrapper() done\n"); + DPRINT1("InitLinuxWrapper() done\n"); return STATUS_SUCCESS; } @@ -264,7 +268,8 @@ } // Dispatch PNP -NTSTATUS STDCALL DispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) +NTSTATUS STDCALL +DispatchPnp(PDEVICE_OBJECT DeviceObject, PIRP Irp) { PIO_STACK_LOCATION IrpSp; NTSTATUS Status; @@ -274,10 +279,9 @@ switch (IrpSp->MinorFunction) { case IRP_MN_START_DEVICE: - //Status = IntVideoPortForwardIrpAndWait(DeviceObject, Irp); - //if (NT_SUCCESS(Status) && NT_SUCCESS(Irp->IoStatus.Status)) - - Status = OHCD_PnPStartDevice(DeviceObject, Irp); +// Status = ForwardIrpAndWait(DeviceObject, Irp); +// if (NT_SUCCESS(Status) && NT_SUCCESS(Irp->IoStatus.Status)) + Status = OHCD_PnPStartDevice(DeviceObject, Irp); Irp->IoStatus.Status = Status; Irp->IoStatus.Information = 0; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -290,8 +294,8 @@ case IRP_MN_SURPRISE_REMOVAL: case IRP_MN_STOP_DEVICE: - //Status = IntVideoPortForwardIrpAndWait(DeviceObject, Irp); - //if (NT_SUCCESS(Status) && NT_SUCCESS(Irp->IoStatus.Status)) +// Status = ForwardIrpAndWait(DeviceObject, Irp); +// if (NT_SUCCESS(Status) && NT_SUCCESS(Irp->IoStatus.Status)) Status = STATUS_SUCCESS; Irp->IoStatus.Status = Status; Irp->IoStatus.Information = 0; @@ -316,22 +320,28 @@ return Status; } -NTSTATUS STDCALL DispatchPower(PDEVICE_OBJECT fido, PIRP Irp) +NTSTATUS STDCALL +DispatchPower(PDEVICE_OBJECT fido, PIRP Irp) { DbgPrint("IRP_MJ_POWER dispatch\n"); return STATUS_SUCCESS; } + /* * Standard DriverEntry method. */ NTSTATUS STDCALL DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegPath) { - DriverObject->DriverUnload = DriverUnload; - DriverObject->DriverExtension->AddDevice = AddDevice; - DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp; - DriverObject->MajorFunction[IRP_MJ_POWER] = DispatchPower; - return STATUS_SUCCESS; + DPRINT1("******************** Cromwell UHCI ********************\n"); + + DriverObject->DriverUnload = DriverUnload; + DriverObject->DriverExtension->AddDevice = AddDevice; + + DriverObject->MajorFunction[IRP_MJ_PNP] = DispatchPnp; + DriverObject->MajorFunction[IRP_MJ_POWER] = DispatchPower; + + return STATUS_SUCCESS; } _____ Modified: trunk/reactos/drivers/usb/cromwell/usb_wrapper.h --- trunk/reactos/drivers/usb/cromwell/usb_wrapper.h 2005-06-01 21:55:09 UTC (rev 15719) +++ trunk/reactos/drivers/usb/cromwell/usb_wrapper.h 2005-06-01 21:55:36 UTC (rev 15720) @@ -2,10 +2,21 @@ //#include <ntos/types.h> //#include <ddk/extypes.h> #include <ddk/ntddk.h> +#define NDEBUG #include <debug.h> void wait_ms(int mils); +#ifndef _snprintf +int _snprintf(char * buf, size_t cnt, const char *fmt, ...); +#endif +#ifndef sprintf +int sprintf(char * buf, const char *fmt, ...); +#endif +#ifndef swprintf +int swprintf(wchar_t *buf, const wchar_t *fmt, ...); +#endif + #include "linux/linux_wrapper.h" #define __KERNEL__ #undef CONFIG_PCI
19 years, 6 months
1
0
0
0
← Newer
1
...
61
62
63
64
65
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Results per page:
10
25
50
100
200