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
October 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
26 participants
737 discussions
Start a n
N
ew thread
[weiden] 18649: minor fixes of included headers
by weiden@svn.reactos.com
minor fixes of included headers Modified: trunk/reactos/lib/advapi32/sec/misc.c Modified: trunk/reactos/lib/advapi32/sec/sec.c Modified: trunk/reactos/lib/advapi32/sec/trustee.c _____ Modified: trunk/reactos/lib/advapi32/sec/misc.c --- trunk/reactos/lib/advapi32/sec/misc.c 2005-10-20 23:08:44 UTC (rev 18648) +++ trunk/reactos/lib/advapi32/sec/misc.c 2005-10-21 09:33:20 UTC (rev 18649) @@ -6,9 +6,6 @@ */ #include <advapi32.h> -#include <accctrl.h> -#include <malloc.h> -#include <ntsecapi.h> #define NDEBUG #include <debug.h> _____ Modified: trunk/reactos/lib/advapi32/sec/sec.c --- trunk/reactos/lib/advapi32/sec/sec.c 2005-10-20 23:08:44 UTC (rev 18648) +++ trunk/reactos/lib/advapi32/sec/sec.c 2005-10-21 09:33:20 UTC (rev 18649) @@ -12,6 +12,8 @@ */ #include <advapi32.h> + +#define NDEBUG #include <debug.h> /* _____ Modified: trunk/reactos/lib/advapi32/sec/trustee.c --- trunk/reactos/lib/advapi32/sec/trustee.c 2005-10-20 23:08:44 UTC (rev 18648) +++ trunk/reactos/lib/advapi32/sec/trustee.c 2005-10-21 09:33:20 UTC (rev 18649) @@ -9,7 +9,7 @@ #include <advapi32.h> #define NDEBUG -#include "debug.h" +#include <debug.h> /*********************************************************************** *******
19 years, 2 months
1
0
0
0
[gedmurphy] 18648: make more robust by calling GetSystemDirectory
by gedmurphy@svn.reactos.com
make more robust by calling GetSystemDirectory Modified: trunk/reactos/lib/syssetup/install.c _____ Modified: trunk/reactos/lib/syssetup/install.c --- trunk/reactos/lib/syssetup/install.c 2005-10-20 22:11:33 UTC (rev 18647) +++ trunk/reactos/lib/syssetup/install.c 2005-10-20 23:08:44 UTC (rev 18648) @@ -400,6 +400,8 @@ { TCHAR sAccessories[256]; TCHAR sGames[256]; + TCHAR Sys[_MAX_PATH]; + # if 0 OutputDebugStringA ("InstallReactOS() called\n"); @@ -446,13 +448,18 @@ CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("explorer.lnk"), _T("explorer.exe"), IDS_CMT_EXPLORER); CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("regedit.lnk"), _T("regedit.exe"), IDS_CMT_REGEDIT); } - + + if(!GetSystemDirectory(Sys, _MAX_PATH)) + Sys[0] = L'\0'; + /* create Games subfolder and fill if the exe is available */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, sGames, 256)) { - /* Check for existence */ - if( (_access( "c:\\reactos\\system32\\sol.exe", 0 )) != -1 ) - CreateShortcut(CSIDL_PROGRAMS, sGames, _T("Solitaire.lnk"), _T("sol.exe"), IDS_CMT_SOLITAIRE); - + if (Sys[0] != L'\0') { + if((_taccess(_tcscat(Sys, _T("\\sol.exe")), 0 )) != -1) + CreateShortcut(CSIDL_PROGRAMS, sGames, _T("Solitaire.lnk"), _T("sol.exe"), IDS_CMT_SOLITAIRE); + + /* winemine etc .... */ + } } CoUninitialize();
19 years, 2 months
1
0
0
0
[gedmurphy] 18647: insert solitaire into the start menu if it's been installed.
by gedmurphy@svn.reactos.com
insert solitaire into the start menu if it's been installed. Modified: trunk/reactos/lib/syssetup/install.c Modified: trunk/reactos/lib/syssetup/resource.h Modified: trunk/reactos/lib/syssetup/syssetup_En.rc _____ Modified: trunk/reactos/lib/syssetup/install.c --- trunk/reactos/lib/syssetup/install.c 2005-10-20 21:55:55 UTC (rev 18646) +++ trunk/reactos/lib/syssetup/install.c 2005-10-20 22:11:33 UTC (rev 18647) @@ -34,6 +34,7 @@ #include <commctrl.h> #include <stdio.h> +#include <io.h> #include <tchar.h> #include <stdlib.h> @@ -446,9 +447,14 @@ CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("regedit.lnk"), _T("regedit.exe"), IDS_CMT_REGEDIT); } - /* create Games subfolder */ - CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, sGames, 256); + /* create Games subfolder and fill if the exe is available */ + if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, sGames, 256)) { + /* Check for existence */ + if( (_access( "c:\\reactos\\system32\\sol.exe", 0 )) != -1 ) + CreateShortcut(CSIDL_PROGRAMS, sGames, _T("Solitaire.lnk"), _T("sol.exe"), IDS_CMT_SOLITAIRE); + } + CoUninitialize(); /* Create the semi-random Domain-SID */ _____ Modified: trunk/reactos/lib/syssetup/resource.h --- trunk/reactos/lib/syssetup/resource.h 2005-10-20 21:55:55 UTC (rev 18646) +++ trunk/reactos/lib/syssetup/resource.h 2005-10-20 22:11:33 UTC (rev 18647) @@ -93,6 +93,7 @@ #define IDS_CMT_WINEFILE 3212 #define IDS_CMT_NOTEPAD 3213 #define IDS_CMT_REGEDIT 3214 +#define IDS_CMT_SOLITAIRE 3215 #define IDR_GPL 4000 _____ Modified: trunk/reactos/lib/syssetup/syssetup_En.rc --- trunk/reactos/lib/syssetup/syssetup_En.rc 2005-10-20 21:55:55 UTC (rev 18646) +++ trunk/reactos/lib/syssetup/syssetup_En.rc 2005-10-20 22:11:33 UTC (rev 18647) @@ -207,6 +207,7 @@ STRINGTABLE BEGIN IDS_GAMES "Games" + IDS_CMT_SOLITAIRE "Solitaire" END
19 years, 2 months
1
0
0
0
[cwittich] 18646: fixed creation of *.vcproj files for object libraries
by cwittich@svn.reactos.com
fixed creation of *.vcproj files for object libraries started implementing code which adds dependencies to *.sln file fixed some warnings in cmd when compiling with msvc 2005 Modified: trunk/reactos/subsys/system/cmd/precomp.h Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp _____ Modified: trunk/reactos/subsys/system/cmd/precomp.h --- trunk/reactos/subsys/system/cmd/precomp.h 2005-10-20 21:11:56 UTC (rev 18645) +++ trunk/reactos/subsys/system/cmd/precomp.h 2005-10-20 21:55:55 UTC (rev 18646) @@ -1,5 +1,6 @@ #ifdef _MSC_VER #pragma warning ( disable : 4103 ) /* use #pragma pack to change alignment */ +#define _CRT_SECURE_NO_DEPRECATE #endif//_MSC_VER #include <stdlib.h> _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp 2005-10-20 21:11:56 UTC (rev 18645) +++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp 2005-10-20 21:55:55 UTC (rev 18646) @@ -53,7 +53,7 @@ } string module_type = GetExtension(module.GetTargetName()); - bool lib = (module_type == ".lib") || (module_type == ".a"); + bool lib = (module.type == ObjectLibrary) || (module_type == ".lib") || (module_type == ".a"); bool dll = (module_type == ".dll") || (module_type == ".cpl"); bool exe = (module_type == ".exe"); // TODO FIXME - need more checks here for 'sys' and possibly 'drv'? @@ -448,8 +448,13 @@ //FIXME: only omit ProjectDependencies in VS 2005 when there are no dependencies //NOTE: VS 2002 do not use ProjectSection; it uses GlobalSection instead - if (configuration.VSProjectVersion == "7.10") { + if ((configuration.VSProjectVersion == "7.10") || (dependencies.size() > 0)) { fprintf ( OUT, "\tProjectSection(ProjectDependencies) = postProject\r\n" ); + for ( size_t i = 0; i < dependencies.size(); i++ ) + { + Dependency& dependency = *dependencies[i]; + fprintf ( OUT, "\t\t%s = %s\r\n", dependency.module.guid.c_str(), dependency.module.guid.c_str() ); + } fprintf ( OUT, "\tEndProjectSection\r\n" ); } @@ -477,10 +482,10 @@ fprintf ( OUT, "\tEndGlobalSection\r\n" ); fprintf ( OUT, "\tGlobalSection(ExtensibilityAddIns) = postSolution\r\n" ); fprintf ( OUT, "\tEndGlobalSection\r\n" ); - if (configuration.VSProjectVersion == "7.00") { fprintf ( OUT, "\tGlobalSection(ProjectDependencies) = postSolution\r\n" ); + //FIXME: Add dependencies for VS 2002 fprintf ( OUT, "\tEndGlobalSection\r\n" ); }
19 years, 2 months
1
0
0
0
[gedmurphy] 18645: setup 'Games' subfolder ready for Solitaire, etc.
by gedmurphy@svn.reactos.com
setup 'Games' subfolder ready for Solitaire, etc. Modified: trunk/reactos/lib/syssetup/install.c Modified: trunk/reactos/lib/syssetup/resource.h Modified: trunk/reactos/lib/syssetup/syssetup_En.rc _____ Modified: trunk/reactos/lib/syssetup/install.c --- trunk/reactos/lib/syssetup/install.c 2005-10-20 19:33:16 UTC (rev 18644) +++ trunk/reactos/lib/syssetup/install.c 2005-10-20 21:11:56 UTC (rev 18645) @@ -398,6 +398,7 @@ InstallReactOS (HINSTANCE hInstance) { TCHAR sAccessories[256]; + TCHAR sGames[256]; # if 0 OutputDebugStringA ("InstallReactOS() called\n"); @@ -439,12 +440,14 @@ /* create and fill Accessories subfolder */ if (CreateShortcutFolder(CSIDL_PROGRAMS, IDS_ACCESSORIES, sAccessories, 256)) { - //CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Calculator.lnk"), _T("calc.exe"), IDS_CMT_CALC); CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("Command Prompt.lnk"), _T("cmd.exe"), IDS_CMT_CMD); CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("notepad.lnk"), _T("notepad.exe"), IDS_CMT_NOTEPAD); CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("explorer.lnk"), _T("explorer.exe"), IDS_CMT_EXPLORER); CreateShortcut(CSIDL_PROGRAMS, sAccessories, _T("regedit.lnk"), _T("regedit.exe"), IDS_CMT_REGEDIT); } + + /* create Games subfolder */ + CreateShortcutFolder(CSIDL_PROGRAMS, IDS_GAMES, sGames, 256); CoUninitialize(); _____ Modified: trunk/reactos/lib/syssetup/resource.h --- trunk/reactos/lib/syssetup/resource.h 2005-10-20 19:33:16 UTC (rev 18644) +++ trunk/reactos/lib/syssetup/resource.h 2005-10-20 21:11:56 UTC (rev 18645) @@ -72,27 +72,27 @@ #define IDS_OWNERSUBTITLE 3021 #define IDS_COMPUTERTITLE 3030 -#define IDS_COMPUTERSUBTITLE 3031 +#define IDS_COMPUTERSUBTITLE 3031 #define IDS_LOCALETITLE 3040 #define IDS_LOCALESUBTITLE 3041 #define IDS_DATETIMETITLE 3050 -#define IDS_DATETIMESUBTITLE 3051 +#define IDS_DATETIMESUBTITLE 3051 #define IDS_PROCESSTITLE 3060 #define IDS_PROCESSSUBTITLE 3061 -#define IDS_ACKPROJECTS 3100 +#define IDS_ACKPROJECTS 3100 #define IDS_ACCESSORIES 3200 +#define IDS_GAMES 3201 -#define IDS_CMT_CMD 3210 +#define IDS_CMT_CMD 3210 #define IDS_CMT_EXPLORER 3211 #define IDS_CMT_WINEFILE 3212 #define IDS_CMT_NOTEPAD 3213 #define IDS_CMT_REGEDIT 3214 -#define IDS_CMT_CALC 3215 #define IDR_GPL 4000 _____ Modified: trunk/reactos/lib/syssetup/syssetup_En.rc --- trunk/reactos/lib/syssetup/syssetup_En.rc 2005-10-20 19:33:16 UTC (rev 18644) +++ trunk/reactos/lib/syssetup/syssetup_En.rc 2005-10-20 21:11:56 UTC (rev 18645) @@ -204,4 +204,10 @@ IDS_CMT_REGEDIT "Launch Registry Editor" END +STRINGTABLE +BEGIN + IDS_GAMES "Games" +END + + /* EOF */
19 years, 2 months
1
0
0
0
[hpoussin] 18644: Add pciidex (controller driver) and pciide (miniport driver). They enumerate channels 0 and 1 on IDE controllers.
by hpoussin@svn.reactos.com
Add pciidex (controller driver) and pciide (miniport driver). They enumerate channels 0 and 1 on IDE controllers. Modified: trunk/reactos/bootdata/packages/reactos.dff Modified: trunk/reactos/drivers/storage/directory.xml Added: trunk/reactos/drivers/storage/pciide/ Added: trunk/reactos/drivers/storage/pciide/pciide.c Added: trunk/reactos/drivers/storage/pciide/pciide.h Added: trunk/reactos/drivers/storage/pciide/pciide.rc Added: trunk/reactos/drivers/storage/pciide/pciide.xml Added: trunk/reactos/drivers/storage/pciidex/ Added: trunk/reactos/drivers/storage/pciidex/fdo.c Added: trunk/reactos/drivers/storage/pciidex/miniport.c Added: trunk/reactos/drivers/storage/pciidex/misc.c Added: trunk/reactos/drivers/storage/pciidex/pciidex.c Added: trunk/reactos/drivers/storage/pciidex/pciidex.def Added: trunk/reactos/drivers/storage/pciidex/pciidex.h Added: trunk/reactos/drivers/storage/pciidex/pciidex.rc Added: trunk/reactos/drivers/storage/pciidex/pciidex.xml Added: trunk/reactos/drivers/storage/pciidex/pdo.c Added: trunk/reactos/media/inf/hdc.inf Modified: trunk/reactos/media/inf/syssetup.inf Added: trunk/reactos/w32api/include/ddk/ide.h _____ Modified: trunk/reactos/bootdata/packages/reactos.dff --- trunk/reactos/bootdata/packages/reactos.dff 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/bootdata/packages/reactos.dff 2005-10-20 19:33:16 UTC (rev 18644) @@ -293,7 +293,7 @@ media\drivers\etc\services 5 media\inf\acpi.inf 6 media\inf\cdrom.inf 6 -media\inf\NET_NIC.inf 6 +media\inf\hdc.inf 6 media\inf\layout.inf 6 media\inf\machine.inf 6 media\inf\mouse.inf 6 _____ Modified: trunk/reactos/drivers/storage/directory.xml --- trunk/reactos/drivers/storage/directory.xml 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/directory.xml 2005-10-20 19:33:16 UTC (rev 18644) @@ -16,6 +16,12 @@ <directory name="floppy"> <xi:include href="floppy/floppy.xml" /> </directory> +<directory name="pciide"> + <xi:include href="pciide/pciide.xml" /> +</directory> +<directory name="pciidex"> + <xi:include href="pciidex/pciidex.xml" /> +</directory> <directory name="scsiport"> <xi:include href="scsiport/scsiport.xml" /> </directory> Property changes on: trunk/reactos/drivers/storage/pciide ___________________________________________________________________ Name: svn:ignore + GNUmakefile *.bak _____ Added: trunk/reactos/drivers/storage/pciide/pciide.c --- trunk/reactos/drivers/storage/pciide/pciide.c 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciide/pciide.c 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,132 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: PCI IDE bus driver + * FILE: drivers/storage/pciide/pciide.c + * PURPOSE: Main file + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) + */ + +#define NDEBUG +#include <debug.h> + +#include "pciide.h" + +IDE_CHANNEL_STATE NTAPI +PciIdeChannelEnabled( + IN PVOID DeviceExtension, + IN ULONG Channel) +{ + PCI_COMMON_CONFIG PciConfig; + NTSTATUS Status; + + DPRINT("PciIdeChannelEnabled(%p, %lu)\n", DeviceExtension, Channel); + + Status = PciIdeXGetBusData( + DeviceExtension, + &PciConfig, + 0, + PCI_COMMON_HDR_LENGTH); + if (!NT_SUCCESS(Status)) + { + DPRINT("PciIdeXGetBusData() failed with status 0x%08lx\n", Status); + return ChannelStateUnknown; + } + + if (PCI_CONFIGURATION_TYPE(&PciConfig) != PCI_DEVICE_TYPE) + { + DPRINT("Wrong PCI card type. Disabling IDE channel #%lu\n", Channel); + return ChannelDisabled; + } + + if (PciConfig.BaseClass != PCI_CLASS_MASS_STORAGE_CTLR || PciConfig.SubClass != PCI_SUBCLASS_MSC_IDE_CTLR) + { + DPRINT("Wrong PCI card base class/sub class. Disabling IDE channel #%lu\n", Channel); + return ChannelDisabled; + } + + /* FIXME: I don't know where to find the enabled/disabled + * bits for channels, so assume they are always enabled + */ + return ChannelEnabled; +} + +BOOLEAN NTAPI +PciIdeSyncAccessRequired( + IN PVOID DeviceExtension) +{ + DPRINT1("PciIdeSyncAccessRequired %p\n", DeviceExtension); + + return FALSE; /* FIXME */ +} + +NTSTATUS NTAPI +PciIdeTransferModeSelect( + IN PVOID DeviceExtension, + IN PPCIIDE_TRANSFER_MODE_SELECT XferMode) +{ + ULONG i; + + DPRINT1("PciIdeTransferModeSelect(%p %p)\n", DeviceExtension, XferMode); + + for (i = 0; i < MAX_IDE_DEVICE; i++) + XferMode->DevicePresent[i] = FALSE; /* FIXME */ + + return STATUS_SUCCESS; +} + +BOOLEAN NTAPI +PciIdeUseDma( + IN PVOID DeviceExtension, + IN PUCHAR CdbCommand, + IN PUCHAR Slave) +{ + DPRINT1("PciIdeUseDma(%p %p %p)\n", DeviceExtension, CdbCommand, Slave); + + return FALSE; +} + +NTSTATUS NTAPI +PciIdeGetControllerProperties( + IN PVOID DeviceExtension, + OUT PIDE_CONTROLLER_PROPERTIES ControllerProperties) +{ + if (ControllerProperties->Size != sizeof(IDE_CONTROLLER_PROPERTIES)) + return STATUS_REVISION_MISMATCH; + + ControllerProperties->PciIdeChannelEnabled = PciIdeChannelEnabled; + ControllerProperties->PciIdeSyncAccessRequired = PciIdeSyncAccessRequired; + ControllerProperties->PciIdeTransferModeSelect = PciIdeTransferModeSelect; + ControllerProperties->IgnoreActiveBitForAtaDevice = FALSE; + ControllerProperties->AlwaysClearBusMasterInterrupt = TRUE; + ControllerProperties->PciIdeUseDma = PciIdeUseDma; + ControllerProperties->AlignmentRequirement = 1; /* FIXME */ + ControllerProperties->DefaultPIO = 0; /* FIXME */ + ControllerProperties->PciIdeUdmaModesSupported = NULL; /* optional */ + + ControllerProperties->SupportedTransferMode[0][0] = + ControllerProperties->SupportedTransferMode[0][1] = + ControllerProperties->SupportedTransferMode[1][0] = + ControllerProperties->SupportedTransferMode[1][0] = + PIO_MODE0 | PIO_MODE1 | PIO_MODE2 | PIO_MODE3 | PIO_MODE4 | + SWDMA_MODE0 | SWDMA_MODE1 | SWDMA_MODE2 | + MWDMA_MODE0 | MWDMA_MODE1 | MWDMA_MODE2 | + UDMA_MODE0 | UDMA_MODE1 | UDMA_MODE2 | UDMA_MODE3 | UDMA_MODE4; + + return STATUS_SUCCESS; +} + +NTSTATUS NTAPI +DriverEntry( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath) +{ + NTSTATUS Status; + + Status = PciIdeXInitialize( + DriverObject, + RegistryPath, + PciIdeGetControllerProperties, + 0); + + return Status; +} Property changes on: trunk/reactos/drivers/storage/pciide/pciide.c ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciide/pciide.h --- trunk/reactos/drivers/storage/pciide/pciide.h 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciide/pciide.h 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,2 @@ +#include <ntddk.h> +#include <ide.h> Property changes on: trunk/reactos/drivers/storage/pciide/pciide.h ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciide/pciide.rc --- trunk/reactos/drivers/storage/pciide/pciide.rc 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciide/pciide.rc 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,5 @@ +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "PCI IDE bus driver\0" +#define REACTOS_STR_INTERNAL_NAME "pciide\0" +#define REACTOS_STR_ORIGINAL_FILENAME "pciide.sys\0" +#include <reactos/version.rc> Property changes on: trunk/reactos/drivers/storage/pciide/pciide.rc ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciide/pciide.xml --- trunk/reactos/drivers/storage/pciide/pciide.xml 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciide/pciide.xml 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,7 @@ +<module name="pciide" type="kernelmodedriver" installbase="system32/drivers" installname="pciide.sys"> + <define name="__USE_W32API" /> + <library>pciidex</library> + <library>ntoskrnl</library> + <file>pciide.c</file> + <file>pciide.rc</file> +</module> Property changes on: trunk/reactos/drivers/storage/pciide/pciide.xml ___________________________________________________________________ Name: svn:eol-style + native Property changes on: trunk/reactos/drivers/storage/pciidex ___________________________________________________________________ Name: svn:ignore + GNUmakefile *.bak _____ Added: trunk/reactos/drivers/storage/pciidex/fdo.c --- trunk/reactos/drivers/storage/pciidex/fdo.c 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciidex/fdo.c 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,437 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: PCI IDE bus driver extension + * FILE: drivers/storage/pciidex/fdo.c + * PURPOSE: IRP_MJ_PNP operations for FDOs + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) + */ + +#define NDEBUG +#include <debug.h> + +#include "pciidex.h" + +static NTSTATUS +GetBusInterface( + IN PFDO_DEVICE_EXTENSION DeviceExtension) +{ + PBUS_INTERFACE_STANDARD BusInterface = NULL; + KEVENT Event; + IO_STATUS_BLOCK IoStatus; + PIRP Irp; + PIO_STACK_LOCATION Stack; + NTSTATUS Status = STATUS_UNSUCCESSFUL; + + if (DeviceExtension->BusInterface) + { + DPRINT("We already have the bus interface\n"); + goto cleanup; + } + + BusInterface = ExAllocatePool(PagedPool, sizeof(BUS_INTERFACE_STANDARD)); + if (!BusInterface) + { + DPRINT("ExAllocatePool() failed\n"); + Status = STATUS_INSUFFICIENT_RESOURCES; + goto cleanup; + } + + KeInitializeEvent(&Event, SynchronizationEvent, FALSE); + Irp = IoBuildSynchronousFsdRequest( + IRP_MJ_PNP, + DeviceExtension->LowerDevice, + NULL, + 0, + NULL, + &Event, + &IoStatus); + if (!Irp) + { + DPRINT("IoBuildSynchronousFsdRequest() failed\n"); + Status = STATUS_INSUFFICIENT_RESOURCES; + goto cleanup; + } + + Irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + Irp->IoStatus.Information = 0; + + Stack = IoGetNextIrpStackLocation(Irp); + Stack->MajorFunction = IRP_MJ_PNP; + Stack->MinorFunction = IRP_MN_QUERY_INTERFACE; + Stack->Parameters.QueryInterface.InterfaceType = (LPGUID)&GUID_BUS_INTERFACE_STANDARD; + Stack->Parameters.QueryInterface.Version = 1; + Stack->Parameters.QueryInterface.Size = sizeof(BUS_INTERFACE_STANDARD); + Stack->Parameters.QueryInterface.Interface = (PINTERFACE)BusInterface; + Stack->Parameters.QueryInterface.InterfaceSpecificData = NULL; + + Status = IoCallDriver(DeviceExtension->LowerDevice, Irp); + if (Status == STATUS_PENDING) + { + KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL); + Status = IoStatus.Status; + } + if (!NT_SUCCESS(Status)) + goto cleanup; + + DeviceExtension->BusInterface = BusInterface; + BusInterface = NULL; + Status = STATUS_SUCCESS; + +cleanup: + ExFreePool(BusInterface); + return Status; +} + +/* +static NTSTATUS +ReleaseBusInterface( + IN PFDO_DEVICE_EXTENSION DeviceExtension) +{ + NTSTATUS Status = STATUS_UNSUCCESSFUL; + + if (DeviceExtension->BusInterface) + { + (*DeviceExtension->BusInterface->InterfaceDereference)( + DeviceExtension->BusInterface->Context); + DeviceExtension->BusInterface = NULL; + Status = STATUS_SUCCESS; + } + + return Status; +} +*/ + +NTSTATUS NTAPI +PciIdeXAddDevice( + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT Pdo) +{ + PPCIIDEX_DRIVER_EXTENSION DriverExtension; + PFDO_DEVICE_EXTENSION DeviceExtension; + PDEVICE_OBJECT Fdo; + NTSTATUS Status; + + DPRINT("PciIdeXAddDevice(%p %p)\n", DriverObject, Pdo); + + DriverExtension = IoGetDriverObjectExtension(DriverObject, DriverObject); + ASSERT(DriverExtension); + + Status = IoCreateDevice( + DriverObject, + sizeof(FDO_DEVICE_EXTENSION) + DriverExtension->MiniControllerExtensionSize, + NULL, + FILE_DEVICE_BUS_EXTENDER, + FILE_DEVICE_SECURE_OPEN, + TRUE, + &Fdo); + if (!NT_SUCCESS(Status)) + { + DPRINT("IoCreateDevice() failed with status 0x%08lx\n", Status); + return Status; + } + + DeviceExtension = (PFDO_DEVICE_EXTENSION)Fdo->DeviceExtension; + RtlZeroMemory(DeviceExtension, sizeof(FDO_DEVICE_EXTENSION)); + + DeviceExtension->Common.IsFDO = TRUE; + + Status = IoAttachDeviceToDeviceStackSafe(Fdo, Pdo, &DeviceExtension->LowerDevice); + if (!NT_SUCCESS(Status)) + { + DPRINT("IoAttachDeviceToDeviceStackSafe() failed with status 0x%08lx\n", Status); + return Status; + } + + Status = GetBusInterface(DeviceExtension); + if (!NT_SUCCESS(Status)) + { + DPRINT("GetBusInterface() failed() failed with status 0x%08lx\n", Status); + return Status; + } + + Fdo->Flags &= ~DO_DEVICE_INITIALIZING; + + return STATUS_SUCCESS; +} + +static NTSTATUS NTAPI +PciIdeXUdmaModesSupported( + IN IDE_DRIVE_IDENTIFY IdentifyData, + OUT PULONG BestXferMode, + OUT PULONG CurrentXferMode) +{ + ULONG Best = PIO_MODE0; + ULONG Current = PIO_MODE0; + + DPRINT("PciIdeXUdmaModesSupported(%lu, %p %p)\n", + IdentifyData, BestXferMode, CurrentXferMode); + + /* FIXME: if current mode is a PIO mode, how to get it? + * At the moment, PIO_MODE0 is always returned... + */ + + if (IdentifyData.TranslationFieldsValid & 0x2) + { + /* PIO modes and some DMA modes are supported */ + if (IdentifyData.AdvancedPIOModes & 0x10) + Best = PIO_MODE4; + else if (IdentifyData.AdvancedPIOModes & 0x8) + Best = PIO_MODE3; + else if (IdentifyData.AdvancedPIOModes & 0x4) + Best = PIO_MODE2; + else if (IdentifyData.AdvancedPIOModes & 0x2) + Best = PIO_MODE1; + else if (IdentifyData.AdvancedPIOModes & 0x1) + Best = PIO_MODE0; + + if (IdentifyData.SingleWordDMASupport & 0x4) + Best = SWDMA_MODE2; + else if (IdentifyData.SingleWordDMASupport & 0x2) + Best = SWDMA_MODE1; + else if (IdentifyData.SingleWordDMASupport & 0x1) + Best = SWDMA_MODE0; + + if (IdentifyData.SingleWordDMAActive & 0x4) + Current = SWDMA_MODE2; + else if (IdentifyData.SingleWordDMAActive & 0x2) + Current = SWDMA_MODE1; + else if (IdentifyData.SingleWordDMAActive & 0x1) + Current = SWDMA_MODE0; + + if (IdentifyData.MultiWordDMASupport & 0x4) + Best = MWDMA_MODE2; + else if (IdentifyData.MultiWordDMASupport & 0x2) + Best = MWDMA_MODE1; + else if (IdentifyData.MultiWordDMASupport & 0x1) + Best = MWDMA_MODE0; + + if (IdentifyData.MultiWordDMAActive & 0x4) + Current = MWDMA_MODE2; + else if (IdentifyData.MultiWordDMAActive & 0x2) + Current = MWDMA_MODE1; + else if (IdentifyData.MultiWordDMAActive & 0x1) + Current = MWDMA_MODE0; + } + + if (IdentifyData.TranslationFieldsValid & 0x4) + { + /* UDMA modes are supported */ + if (IdentifyData.UltraDMAActive & 0x10) + Current = UDMA_MODE4; + else if (IdentifyData.UltraDMAActive & 0x8) + Current = UDMA_MODE3; + else if (IdentifyData.UltraDMAActive & 0x4) + Current = UDMA_MODE2; + else if (IdentifyData.UltraDMAActive & 0x2) + Current = UDMA_MODE1; + else if (IdentifyData.UltraDMAActive & 0x1) + Current = UDMA_MODE0; + + if (IdentifyData.UltraDMASupport & 0x10) + Best = UDMA_MODE4; + else if (IdentifyData.UltraDMASupport & 0x8) + Best = UDMA_MODE3; + else if (IdentifyData.UltraDMASupport & 0x4) + Best = UDMA_MODE2; + else if (IdentifyData.UltraDMASupport & 0x2) + Best = UDMA_MODE1; + else if (IdentifyData.UltraDMASupport & 0x1) + Best = UDMA_MODE0; + } + + *BestXferMode = Best; + *CurrentXferMode = Current; + return TRUE; +} + +static NTSTATUS +PciIdeXFdoStartDevice( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PPCIIDEX_DRIVER_EXTENSION DriverExtension; + PFDO_DEVICE_EXTENSION DeviceExtension; + PCM_RESOURCE_LIST ResourceList; + NTSTATUS Status; + + DPRINT("PciIdeXStartDevice(%p %p)\n", DeviceObject, Irp); + + DriverExtension = IoGetDriverObjectExtension(DeviceObject->DriverObject, DeviceObject->DriverObject); + ASSERT(DriverExtension); + DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + ASSERT(DeviceExtension); + ASSERT(DeviceExtension->Common.IsFDO); + + DeviceExtension->Properties.Size = sizeof(IDE_CONTROLLER_PROPERTIES); + DeviceExtension->Properties.ExtensionSize = DriverExtension->MiniControllerExtensionSize; + Status = DriverExtension->HwGetControllerProperties( + DeviceExtension->MiniControllerExtension, + &DeviceExtension->Properties); + if (!NT_SUCCESS(Status)) + return Status; + + DriverExtension->HwUdmaModesSupported = DeviceExtension->Properties.PciIdeUdmaModesSupported; + if (!DriverExtension->HwUdmaModesSupported) + /* This method is optional, so provide our own one */ + DriverExtension->HwUdmaModesSupported = PciIdeXUdmaModesSupported; + + /* Get bus master port base, if any */ + ResourceList = IoGetCurrentIrpStackLocation(Irp)->Parameters.StartDevice.AllocatedResou rces; + if (ResourceList + && ResourceList->Count == 1 + && ResourceList->List[0].PartialResourceList.Count == 1 + && ResourceList->List[0].PartialResourceList.Version == 1 + && ResourceList->List[0].PartialResourceList.Revision == 1 + && ResourceList->List[0].PartialResourceList.PartialDescriptors[0].Type == CmResourceTypePort + && ResourceList->List[0].PartialResourceList.PartialDescriptors[0].u.Port.L ength == 16) + { + DeviceExtension->BusMasterPortBase = ResourceList->List[0].PartialResourceList.PartialDescriptors[0].u.Port.S tart; + } + return STATUS_SUCCESS; +} + +static NTSTATUS +PciIdeXFdoQueryBusRelations( + IN PDEVICE_OBJECT DeviceObject, + OUT PDEVICE_RELATIONS* pDeviceRelations) +{ + PFDO_DEVICE_EXTENSION DeviceExtension; + PDEVICE_RELATIONS DeviceRelations = NULL; + PDEVICE_OBJECT Pdo; + PPDO_DEVICE_EXTENSION PdoDeviceExtension; + ULONG i, j; + ULONG PDOs = 0; + IDE_CHANNEL_STATE ChannelState; + NTSTATUS Status; + + DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; + ASSERT(DeviceExtension); + ASSERT(DeviceExtension->Common.IsFDO); + + for (i = 0; i < MAX_IDE_CHANNEL; i++) + { + if (DeviceExtension->Pdo[i]) + { + PDOs++; + continue; + } + ChannelState = DeviceExtension->Properties.PciIdeChannelEnabled( + DeviceExtension->MiniControllerExtension, i); + if (ChannelState != ChannelEnabled) + { + DPRINT("Channel %lu is disabled\n", i); + continue; + } + + /* Need to create a PDO */ + Status = IoCreateDevice( + DeviceObject->DriverObject, + sizeof(PDO_DEVICE_EXTENSION), + NULL, + FILE_DEVICE_CONTROLLER, + FILE_AUTOGENERATED_DEVICE_NAME, + FALSE, + &Pdo); + if (!NT_SUCCESS(Status)) + /* FIXME: handle error */ + continue; + + PdoDeviceExtension = (PPDO_DEVICE_EXTENSION)Pdo->DeviceExtension; + RtlZeroMemory(PdoDeviceExtension, sizeof(PDO_DEVICE_EXTENSION)); + PdoDeviceExtension->Common.IsFDO = FALSE; + PdoDeviceExtension->Channel = i; + PdoDeviceExtension->ControllerFdo = DeviceObject; + Pdo->Flags |= DO_BUS_ENUMERATED_DEVICE; + Pdo->Flags &= ~DO_DEVICE_INITIALIZING; + + DeviceExtension->Pdo[i] = Pdo; + PDOs++; + } + + if (PDOs == 0) + { + DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePool( + PagedPool, + sizeof(DEVICE_RELATIONS)); + } + else + { + DeviceRelations = (PDEVICE_RELATIONS)ExAllocatePool( + PagedPool, + sizeof(DEVICE_RELATIONS) + sizeof(PDEVICE_OBJECT) * (PDOs - 1)); + } + if (!DeviceRelations) + return STATUS_INSUFFICIENT_RESOURCES; + + DeviceRelations->Count = PDOs; + for (i = 0, j = 0; i < MAX_IDE_CHANNEL; i++) + { + if (DeviceExtension->Pdo[i]) + { + ObReferenceObject(DeviceExtension->Pdo[i]); + DeviceRelations->Objects[j++] = DeviceExtension->Pdo[i]; + } + } + + *pDeviceRelations = DeviceRelations; + return STATUS_SUCCESS; +} + +NTSTATUS NTAPI +PciIdeXFdoPnpDispatch( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + ULONG MinorFunction; + PIO_STACK_LOCATION Stack; + ULONG_PTR Information = 0; + NTSTATUS Status; + + Stack = IoGetCurrentIrpStackLocation(Irp); + MinorFunction = Stack->MinorFunction; + + switch (MinorFunction) + { + case IRP_MN_START_DEVICE: /* 0x00 */ + { + DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); + /* Call lower driver */ + Status = ForwardIrpAndWait(DeviceObject, Irp); + if (NT_SUCCESS(Status)) + Status = PciIdeXFdoStartDevice(DeviceObject, Irp); + break; + } + case IRP_MN_QUERY_DEVICE_RELATIONS: /* 0x07 */ + { + switch (Stack->Parameters.QueryDeviceRelations.Type) + { + case BusRelations: + { + PDEVICE_RELATIONS DeviceRelations = NULL; + DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); + Status = PciIdeXFdoQueryBusRelations(DeviceObject, &DeviceRelations); + Information = (ULONG_PTR)DeviceRelations; + break; + } + default: + { + DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", + Stack->Parameters.QueryDeviceRelations.Type); + Status = STATUS_NOT_IMPLEMENTED; + break; + } + } + break; + } + default: + { + DPRINT1("IRP_MJ_PNP / Unknown minor function 0x%lx\n", MinorFunction); + return ForwardIrpAndForget(DeviceObject, Irp); + } + } + + Irp->IoStatus.Information = Information; + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; +} Property changes on: trunk/reactos/drivers/storage/pciidex/fdo.c ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciidex/miniport.c --- trunk/reactos/drivers/storage/pciidex/miniport.c 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciidex/miniport.c 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,104 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: PCI IDE bus driver extension + * FILE: drivers/storage/pciidex/miniport.c + * PURPOSE: Miniport functions + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) + */ + +#define NDEBUG +#include <debug.h> + +#define INITGUID +#include "pciidex.h" + +static NTSTATUS NTAPI +PciIdeXPnpDispatch( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + if (((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) + return PciIdeXFdoPnpDispatch(DeviceObject, Irp); + else + return PciIdeXPdoPnpDispatch(DeviceObject, Irp); +} + +NTSTATUS NTAPI +PciIdeXInitialize( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath, + IN PCONTROLLER_PROPERTIES HwGetControllerProperties, + IN ULONG ExtensionSize) +{ + ULONG i; + PPCIIDEX_DRIVER_EXTENSION DriverExtension; + NTSTATUS Status; + + DPRINT("PciIdeXInitialize(%p '%wZ' %p 0x%lx)\n", + DriverObject, RegistryPath, HwGetControllerProperties, ExtensionSize); + + Status = IoAllocateDriverObjectExtension( + DriverObject, + DriverObject, + sizeof(PCIIDEX_DRIVER_EXTENSION), + (PVOID*)&DriverExtension); + if (!NT_SUCCESS(Status)) + return Status; + RtlZeroMemory(DriverExtension, sizeof(PCIIDEX_DRIVER_EXTENSION)); + DriverExtension->MiniControllerExtensionSize = ExtensionSize; + DriverExtension->HwGetControllerProperties = HwGetControllerProperties; + + DriverObject->DriverExtension->AddDevice = PciIdeXAddDevice; + + for (i = 0; i < IRP_MJ_MAXIMUM_FUNCTION; i++) + DriverObject->MajorFunction[i] = ForwardIrpAndForget; + DriverObject->MajorFunction[IRP_MJ_PNP] = PciIdeXPnpDispatch; + + return STATUS_SUCCESS; +} + +/* May be called at IRQL <= DISPATCH_LEVEL */ +NTSTATUS NTAPI +PciIdeXGetBusData( + IN PVOID DeviceExtension, + IN PVOID Buffer, + IN ULONG ConfigDataOffset, + IN ULONG BufferLength) +{ + PFDO_DEVICE_EXTENSION FdoDeviceExtension; + ULONG BytesRead = 0; + NTSTATUS Status = STATUS_UNSUCCESSFUL; + + DPRINT("PciIdeXGetBusData(%p %p 0x%lx 0x%lx)\n", + DeviceExtension, Buffer, ConfigDataOffset, BufferLength); + + FdoDeviceExtension = CONTAINING_RECORD(DeviceExtension, FDO_DEVICE_EXTENSION, MiniControllerExtension); + if (FdoDeviceExtension->BusInterface) + { + BytesRead = (*FdoDeviceExtension->BusInterface->GetBusData)( + FdoDeviceExtension->BusInterface->Context, + PCI_WHICHSPACE_CONFIG, + Buffer, + ConfigDataOffset, + BufferLength); + if (BytesRead == BufferLength) + Status = STATUS_SUCCESS; + } + + return Status; +} + +/* May be called at IRQL <= DISPATCH_LEVEL */ +NTSTATUS NTAPI +PciIdeXSetBusData( + IN PVOID DeviceExtension, + IN PVOID Buffer, + IN PVOID DataMask, + IN ULONG ConfigDataOffset, + IN ULONG BufferLength) +{ + DPRINT1("PciIdeXSetBusData(%p %p %p 0x%lx 0x%lx)\n", + DeviceExtension, Buffer, DataMask, ConfigDataOffset, BufferLength); + + return STATUS_NOT_IMPLEMENTED; +} Property changes on: trunk/reactos/drivers/storage/pciidex/miniport.c ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciidex/misc.c --- trunk/reactos/drivers/storage/pciidex/misc.c 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciidex/misc.c 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,68 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: PCI IDE bus driver extension + * FILE: drivers/storage/pciidex/misc.c + * PURPOSE: Misceallenous operations + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) + */ + +#define NDEBUG +#include <debug.h> + +#include "pciidex.h" + +NTSTATUS NTAPI +PciIdeXGenericCompletion( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context) +{ + if (Irp->PendingReturned) + KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE); + return STATUS_MORE_PROCESSING_REQUIRED; +} + +NTSTATUS +ForwardIrpAndWait( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PDEVICE_OBJECT LowerDevice; + KEVENT Event; + NTSTATUS Status; + + ASSERT(((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) ; + LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice; + ASSERT(LowerDevice); + + KeInitializeEvent(&Event, NotificationEvent, FALSE); + IoCopyCurrentIrpStackLocationToNext(Irp); + + DPRINT("Calling lower device %p [%wZ]\n", LowerDevice, &LowerDevice->DriverObject->DriverName); + IoSetCompletionRoutine(Irp, PciIdeXGenericCompletion, &Event, TRUE, TRUE, TRUE); + + Status = IoCallDriver(LowerDevice, Irp); + if (Status == STATUS_PENDING) + { + Status = KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); + if (NT_SUCCESS(Status)) + Status = Irp->IoStatus.Status; + } + + return Status; +} + +NTSTATUS NTAPI +ForwardIrpAndForget( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp) +{ + PDEVICE_OBJECT LowerDevice; + + ASSERT(((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsFDO) ; + LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice; + ASSERT(LowerDevice); + + IoSkipCurrentIrpStackLocation(Irp); + return IoCallDriver(LowerDevice, Irp); +} Property changes on: trunk/reactos/drivers/storage/pciidex/misc.c ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciidex/pciidex.c --- trunk/reactos/drivers/storage/pciidex/pciidex.c 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciidex/pciidex.c 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,20 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: PCI IDE bus driver extension + * FILE: drivers/storage/pciidex/pciidex.c + * PURPOSE: Main file + * PROGRAMMERS: HervÚ Poussineau (hpoussin(a)reactos.org) + */ + +#define NDEBUG +#include <debug.h> + +#include "pciidex.h" + +NTSTATUS NTAPI +DriverEntry( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPath) +{ + return STATUS_SUCCESS; +} Property changes on: trunk/reactos/drivers/storage/pciidex/pciidex.c ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciidex/pciidex.def --- trunk/reactos/drivers/storage/pciidex/pciidex.def 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciidex/pciidex.def 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,8 @@ +LIBRARY pciidex.sys + +EXPORTS +PciIdeXGetBusData@16 +PciIdeXInitialize@16 +PciIdeXSetBusData@20 + +;EOF \ No newline at end of file Property changes on: trunk/reactos/drivers/storage/pciidex/pciidex.def ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciidex/pciidex.h --- trunk/reactos/drivers/storage/pciidex/pciidex.h 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciidex/pciidex.h 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,81 @@ +#include <ntddk.h> +#include <ntifs.h> +#include <ide.h> +#include <wdmguid.h> +#include <stdio.h> + +/* FIXME: I don't know why it is not defined anywhere... */ +NTSTATUS STDCALL +IoAttachDeviceToDeviceStackSafe( + IN PDEVICE_OBJECT SourceDevice, + IN PDEVICE_OBJECT TargetDevice, + OUT PDEVICE_OBJECT *AttachedToDeviceObject); + +typedef struct _PCIIDEX_DRIVER_EXTENSION +{ + PCONTROLLER_PROPERTIES HwGetControllerProperties; + ULONG MiniControllerExtensionSize; + PCIIDE_UDMA_MODES_SUPPORTED HwUdmaModesSupported; +} PCIIDEX_DRIVER_EXTENSION, *PPCIIDEX_DRIVER_EXTENSION; + +typedef struct _COMMON_DEVICE_EXTENSION +{ + BOOLEAN IsFDO; +} COMMON_DEVICE_EXTENSION, *PCOMMON_DEVICE_EXTENSION; + +typedef struct _FDO_DEVICE_EXTENSION +{ + COMMON_DEVICE_EXTENSION Common; + + PBUS_INTERFACE_STANDARD BusInterface; + IDE_CONTROLLER_PROPERTIES Properties; + PHYSICAL_ADDRESS BusMasterPortBase; + PDEVICE_OBJECT LowerDevice; + PDEVICE_OBJECT Pdo[MAX_IDE_CHANNEL]; + PBYTE MiniControllerExtension[0]; +} FDO_DEVICE_EXTENSION, *PFDO_DEVICE_EXTENSION; + +typedef struct _PDO_DEVICE_EXTENSION +{ + COMMON_DEVICE_EXTENSION Common; + + ULONG Channel; + PDEVICE_OBJECT ControllerFdo; +} PDO_DEVICE_EXTENSION, *PPDO_DEVICE_EXTENSION; + +/* fdo.c */ + +NTSTATUS NTAPI +PciIdeXAddDevice( + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT Pdo); + +NTSTATUS NTAPI +PciIdeXFdoPnpDispatch( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +/* misc.c */ + +NTSTATUS NTAPI +PciIdeXGenericCompletion( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PVOID Context); + +NTSTATUS +ForwardIrpAndWait( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +NTSTATUS NTAPI +ForwardIrpAndForget( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); + +/* pdo.c */ + +NTSTATUS NTAPI +PciIdeXPdoPnpDispatch( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp); Property changes on: trunk/reactos/drivers/storage/pciidex/pciidex.h ___________________________________________________________________ Name: svn:eol-style + native _____ Added: trunk/reactos/drivers/storage/pciidex/pciidex.rc --- trunk/reactos/drivers/storage/pciidex/pciidex.rc 2005-10-20 18:55:45 UTC (rev 18643) +++ trunk/reactos/drivers/storage/pciidex/pciidex.rc 2005-10-20 19:33:16 UTC (rev 18644) @@ -0,0 +1,5 @@ [truncated at 1000 lines; 830 more skipped]
19 years, 2 months
1
0
0
0
[cwittich] 18643: fixing OutputFile in *.vcproj files
by cwittich@svn.reactos.com
fixing OutputFile in *.vcproj files Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp _____ Modified: trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp --- trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp 2005-10-20 18:17:06 UTC (rev 18642) +++ trunk/reactos/tools/rbuild/backend/msvc/vcprojmaker.cpp 2005-10-20 18:55:45 UTC (rev 18643) @@ -284,7 +284,7 @@ { fprintf ( OUT, "\t\t\t<Tool\r\n" ); fprintf ( OUT, "\t\t\t\tName=\"VCLibrarianTool\"\r\n" ); - fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s.%s\"/>\r\n", module.name.c_str(), module_type.c_str() ); + fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s%s\"/>\r\n", module.name.c_str(), module_type.c_str() ); } else { @@ -300,7 +300,7 @@ } fprintf ( OUT, "\"\r\n" ); - fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s.%s\"\r\n", module.name.c_str(), module_type.c_str() ); + fprintf ( OUT, "\t\t\t\tOutputFile=\"$(OutDir)/%s%s\"\r\n", module.name.c_str(), module_type.c_str() ); fprintf ( OUT, "\t\t\t\tLinkIncremental=\"%d\"\r\n", debug ? 2 : 1 ); fprintf ( OUT, "\t\t\t\tGenerateDebugInformation=\"TRUE\"\r\n" );
19 years, 2 months
1
0
0
0
[weiden] 18642: improved error handling in RegRenameKey
by weiden@svn.reactos.com
improved error handling in RegRenameKey Modified: trunk/reactos/subsys/system/regedit/regproc.c _____ Modified: trunk/reactos/subsys/system/regedit/regproc.c --- trunk/reactos/subsys/system/regedit/regproc.c 2005-10-20 18:07:00 UTC (rev 18641) +++ trunk/reactos/subsys/system/regedit/regproc.c 2005-10-20 18:17:06 UTC (rev 18642) @@ -1622,23 +1622,27 @@ LPTSTR lpNewSubKey = NULL; LONG Ret = 0; - s = _tcsrchr(lpSubKey, '\\'); + s = _tcsrchr(lpSubKey, _T('\\')); if (s) { s++; lpNewSubKey = (LPTSTR) HeapAlloc(GetProcessHeap(), 0, (s - lpSubKey + _tcslen(lpNewName) + 1) * sizeof(TCHAR)); - if (lpNewName != NULL) { - memcpy(lpNewSubKey, lpSubKey, (s - lpSubKey) * sizeof(TCHAR)); - _tcscpy(lpNewSubKey + (s - lpSubKey), lpNewName); - lpNewName = lpNewSubKey; - } + if (lpNewSubKey != NULL) + { + memcpy(lpNewSubKey, lpSubKey, (s - lpSubKey) * sizeof(TCHAR)); + _tcscpy(lpNewSubKey + (s - lpSubKey), lpNewName); + lpNewName = lpNewSubKey; + } + else + return ERROR_NOT_ENOUGH_MEMORY; } - if (lpNewName != NULL) { - Ret = RegMoveKey(hKey, lpNewName, hKey, lpSubKey); - if (s) { - HeapFree(GetProcessHeap(), 0, lpNewSubKey); - } - } + + Ret = RegMoveKey(hKey, lpNewName, hKey, lpSubKey); + + if (lpNewSubKey) + { + HeapFree(GetProcessHeap(), 0, lpNewSubKey); + } return Ret; }
19 years, 2 months
1
0
0
0
[weiden] 18641: fixed uninitialized variable warning
by weiden@svn.reactos.com
fixed uninitialized variable warning Modified: trunk/reactos/subsys/system/regedit/regproc.c _____ Modified: trunk/reactos/subsys/system/regedit/regproc.c --- trunk/reactos/subsys/system/regedit/regproc.c 2005-10-20 17:59:00 UTC (rev 18640) +++ trunk/reactos/subsys/system/regedit/regproc.c 2005-10-20 18:07:00 UTC (rev 18641) @@ -1619,7 +1619,7 @@ LONG RegRenameKey(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpNewName) { LPCTSTR s; - LPTSTR lpNewSubKey; + LPTSTR lpNewSubKey = NULL; LONG Ret = 0; s = _tcsrchr(lpSubKey, '\\');
19 years, 2 months
1
0
0
0
[weiden] 18640: fix r18639 the right way: don't check a - possibly random - pointer supplied by the caller, also correctly clear the owner SID pointer
by weiden@svn.reactos.com
fix r18639 the right way: don't check a - possibly random - pointer supplied by the caller, also correctly clear the owner SID pointer Modified: trunk/reactos/lib/advapi32/sec/misc.c _____ Modified: trunk/reactos/lib/advapi32/sec/misc.c --- trunk/reactos/lib/advapi32/sec/misc.c 2005-10-20 17:48:19 UTC (rev 18639) +++ trunk/reactos/lib/advapi32/sec/misc.c 2005-10-20 17:59:00 UTC (rev 18640) @@ -1200,10 +1200,10 @@ if ((SecurityInfo & OWNER_SECURITY_INFORMATION) && ppsidOwner != NULL) { - ppsidOwner = NULL; + *ppsidOwner = NULL; } if ((SecurityInfo & GROUP_SECURITY_INFORMATION) && - (ppsidGroup) && (*ppsidGroup)) + ppsidGroup != NULL) { *ppsidGroup = NULL; }
19 years, 2 months
1
0
0
0
← Newer
1
...
25
26
27
28
29
30
31
...
74
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
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200