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 2006
----- 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
17 participants
357 discussions
Start a n
N
ew thread
[janderwald] 24643: - fix string define mess
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 24 15:45:21 2006 New Revision: 24643 URL:
http://svn.reactos.org/svn/reactos?rev=24643&view=rev
Log: - fix string define mess Modified: trunk/reactos/tools/sysreg/comp_factory.h trunk/reactos/tools/sysreg/conf_parser.cpp trunk/reactos/tools/sysreg/conf_parser.h trunk/reactos/tools/sysreg/env_var.cpp trunk/reactos/tools/sysreg/env_var.h trunk/reactos/tools/sysreg/file_reader.h trunk/reactos/tools/sysreg/pipe_reader.cpp trunk/reactos/tools/sysreg/pipe_reader.h trunk/reactos/tools/sysreg/reg_test.h trunk/reactos/tools/sysreg/rosboot_test.cpp trunk/reactos/tools/sysreg/sym_file.cpp trunk/reactos/tools/sysreg/sym_file.h trunk/reactos/tools/sysreg/sysreg.cpp trunk/reactos/tools/sysreg/sysreg.h trunk/reactos/tools/sysreg/user_types.h Modified: trunk/reactos/tools/sysreg/comp_factory.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/comp_factory.…
============================================================================== --- trunk/reactos/tools/sysreg/comp_factory.h (original) +++ trunk/reactos/tools/sysreg/comp_factory.h Tue Oct 24 15:45:21 2006 @@ -11,6 +11,7 @@ */ +#include "user_types.h" #include <map> #include <vector> @@ -18,20 +19,6 @@ { using std::map; using std::vector; - -#ifdef UNICODE - - using std::wcout; - using std::endl; - -#define cout wcout; - -#else - - using std::cout; - using std::endl; - -#endif //---------------------------------------------------------- /// Modified: trunk/reactos/tools/sysreg/conf_parser.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/conf_parser.c…
============================================================================== --- trunk/reactos/tools/sysreg/conf_parser.cpp (original) +++ trunk/reactos/tools/sysreg/conf_parser.cpp Tue Oct 24 15:45:21 2006 @@ -14,20 +14,6 @@ namespace Sysreg_ { -#ifdef UNICODE - - using std::wcerr; - using std::endl; - -#define cerr wcerr - -#else - - using std::cerr; - using std::endl; - -#endif - using std::ifstream; //--------------------------------------------------------------------------------------- ConfigParser::ConfigParser() Modified: trunk/reactos/tools/sysreg/conf_parser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/conf_parser.h…
============================================================================== --- trunk/reactos/tools/sysreg/conf_parser.h (original) +++ trunk/reactos/tools/sysreg/conf_parser.h Tue Oct 24 15:45:21 2006 @@ -11,14 +11,11 @@ */ #include "user_types.h" -#include <string> #include <map> -#include <tchar.h> namespace Sysreg_ { using std::map; - using std::wstring; //--------------------------------------------------------------------------------------- /// /// class ConfigParser @@ -36,8 +33,6 @@ { public: - typedef std::basic_string<TCHAR> string; - typedef std::basic_istringstream<TCHAR> istringstream; typedef map<string, string> ConfigMap; //--------------------------------------------------------------------------------------- /// Modified: trunk/reactos/tools/sysreg/env_var.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/env_var.cpp?r…
============================================================================== --- trunk/reactos/tools/sysreg/env_var.cpp (original) +++ trunk/reactos/tools/sysreg/env_var.cpp Tue Oct 24 15:45:21 2006 @@ -13,20 +13,6 @@ namespace System_ { -#ifdef UNICODE - - using std::wcerr; - using std::endl; - -#define cerr wcerr - -#else - - using std::cerr; - using std::endl; - -#endif - EnvironmentVariable::EnvironmentMap EnvironmentVariable::m_Map; @@ -44,7 +30,7 @@ //--------------------------------------------------------------------------------------- - bool EnvironmentVariable::getValue(const System_::string &EnvName, System_::string &EnvValue) + bool EnvironmentVariable::getValue( string const &EnvName, string &EnvValue) { EnvironmentMap::const_iterator it = m_Map.find (EnvName); if (it != m_Map.end()) Modified: trunk/reactos/tools/sysreg/env_var.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/env_var.h?rev…
============================================================================== --- trunk/reactos/tools/sysreg/env_var.h (original) +++ trunk/reactos/tools/sysreg/env_var.h Tue Oct 24 15:45:21 2006 @@ -10,15 +10,13 @@ * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) */ -#include <string> +#include "user_types.h" #include <map> -#include <tchar.h> + namespace System_ { - using std::map; - typedef std::basic_string<TCHAR> string; //--------------------------------------------------------------------------------------- /// /// class EnvironmentVariable Modified: trunk/reactos/tools/sysreg/file_reader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/file_reader.h…
============================================================================== --- trunk/reactos/tools/sysreg/file_reader.h (original) +++ trunk/reactos/tools/sysreg/file_reader.h Tue Oct 24 15:45:21 2006 @@ -12,7 +12,6 @@ #include "user_types.h" - #include <vector> namespace System_ Modified: trunk/reactos/tools/sysreg/pipe_reader.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/pipe_reader.c…
============================================================================== --- trunk/reactos/tools/sysreg/pipe_reader.cpp (original) +++ trunk/reactos/tools/sysreg/pipe_reader.cpp Tue Oct 24 15:45:21 2006 @@ -14,20 +14,6 @@ namespace System_ { -#ifdef UNICODE - - using std::wcerr; - using std::endl; - -#define cerr wcerr - -#else - - using std::cerr; - using std::endl; - -#endif - //--------------------------------------------------------------------------------------- PipeReader::PipeReader() : m_File(NULL) { @@ -42,7 +28,7 @@ //--------------------------------------------------------------------------------------- - bool PipeReader::openPipe(const System_::string &PipeCmd, System_::string AccessMode) + bool PipeReader::openPipe(string const & PipeCmd, string AccessMode) { if (m_File != NULL) { @@ -92,11 +78,11 @@ //--------------------------------------------------------------------------------------- - string::size_type PipeReader::readPipe(System_::string &Buffer) + string::size_type PipeReader::readPipe(string &Buffer) { TCHAR * buf = (TCHAR *)Buffer.c_str(); - System_::string::size_type size = Buffer.capacity(); + string::size_type size = Buffer.capacity(); //#ifdef NDEBUG memset(buf, 0x0, sizeof(TCHAR) * size); Modified: trunk/reactos/tools/sysreg/pipe_reader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/pipe_reader.h…
============================================================================== --- trunk/reactos/tools/sysreg/pipe_reader.h (original) +++ trunk/reactos/tools/sysreg/pipe_reader.h Tue Oct 24 15:45:21 2006 @@ -12,14 +12,12 @@ -#include <string> -#include <tchar.h> +#include "user_types.h" #include <stdio.h> #include <stdlib.h> namespace System_ { - typedef std::basic_string<TCHAR> string; //--------------------------------------------------------------------------------------- /// /// class PipeReader Modified: trunk/reactos/tools/sysreg/reg_test.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/reg_test.h?re…
============================================================================== --- trunk/reactos/tools/sysreg/reg_test.h (original) +++ trunk/reactos/tools/sysreg/reg_test.h Tue Oct 24 15:45:21 2006 @@ -10,16 +10,12 @@ * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) */ +#include "user_types.h" #include "conf_parser.h" - -#include <string> -#include <tchar.h> namespace Sysreg_ { using Sysreg_::ConfigParser; - - typedef std::basic_string<TCHAR> string; //------------------------------------------------------------------- /// /// class RegressionTest Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Oct 24 15:45:21 2006 @@ -30,20 +30,6 @@ namespace Sysreg_ { -#ifdef UNICODE - - using std::wcerr; - using std::endl; - -#define cerr wcerr - -#else - - using std::cerr; - using std::endl; - -#endif - using std::vector; using System_::PipeReader; using System_::SymbolFile; @@ -376,7 +362,7 @@ return ret; } //--------------------------------------------------------------------------------------- - bool RosBootTest::fetchDebugByFile(Sysreg_::string boot_cmd, Sysreg_::string debug_log) + bool RosBootTest::fetchDebugByFile(string boot_cmd, string debug_log) { PipeReader pipe_reader; Modified: trunk/reactos/tools/sysreg/sym_file.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sym_file.cpp?…
============================================================================== --- trunk/reactos/tools/sysreg/sym_file.cpp (original) +++ trunk/reactos/tools/sysreg/sym_file.cpp Tue Oct 24 15:45:21 2006 @@ -26,23 +26,7 @@ namespace System_ { -#ifdef UNICODE - - using std::wcerr; - using std::endl; - -#define cerr wcerr - -#else - - using std::cerr; - using std::endl; - -#endif - - using std::vector; - string SymbolFile::VAR_ROS_OUTPUT = _T("ROS_OUTPUT"); string SymbolFile::ROS_ADDR2LINE = _T("ROS_ADDR2LINE"); string SymbolFile::m_SymbolPath= _T(""); @@ -62,7 +46,7 @@ } //--------------------------------------------------------------------------------------- - bool SymbolFile::initialize(ConfigParser & conf_parser, const System_::string &Path) + bool SymbolFile::initialize(ConfigParser & conf_parser, string const &Path) { vector<string> vect; string current_dir; @@ -194,7 +178,7 @@ } //--------------------------------------------------------------------------------------- - bool SymbolFile::getSymbolFilePath(const System_::string &ModuleName, System_::string &FilePath) + bool SymbolFile::getSymbolFilePath(string const &ModuleName, string &FilePath) { SymbolMap::const_iterator it = m_Map.find (ModuleName); Modified: trunk/reactos/tools/sysreg/sym_file.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sym_file.h?re…
============================================================================== --- trunk/reactos/tools/sysreg/sym_file.h (original) +++ trunk/reactos/tools/sysreg/sym_file.h Tue Oct 24 15:45:21 2006 @@ -12,15 +12,10 @@ */ #include "conf_parser.h" - -#include <string> -#include <tchar.h> #include <map> namespace System_ { - - typedef std::basic_string<TCHAR> string; using Sysreg_::ConfigParser; //--------------------------------------------------------------------------------------- Modified: trunk/reactos/tools/sysreg/sysreg.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.cpp?re…
============================================================================== --- trunk/reactos/tools/sysreg/sysreg.cpp (original) +++ trunk/reactos/tools/sysreg/sysreg.cpp Tue Oct 24 15:45:21 2006 @@ -10,27 +10,6 @@ #include "sysreg.h" - -#ifdef UNICODE - - using std::wcerr; - using std::endl; - using std::wcout; - -#define cerr wcerr -#define cout wcout - -#else - - using std::cerr; - using std::cout; - using std::endl; - -#endif - - -typedef std::basic_string<TCHAR> string; - using System_::EnvironmentVariable; using System_::ComponentFactoryTemplate; Modified: trunk/reactos/tools/sysreg/sysreg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.h?rev=…
============================================================================== --- trunk/reactos/tools/sysreg/sysreg.h (original) +++ trunk/reactos/tools/sysreg/sysreg.h Tue Oct 24 15:45:21 2006 @@ -10,25 +10,15 @@ * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) */ -#include <tchar.h> -#include <string> -#include <iostream> - - - +#include "user_types.h" #include "env_var.h" -#include "pipe_reader.h" +#include "sym_file.h" #include "comp_factory.h" #include "conf_parser.h" // regression test classes #include "rosboot_test.h" -//test include -#include "sym_file.h" - - - #endif /* end of SYSREG_H__ */ Modified: trunk/reactos/tools/sysreg/user_types.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/user_types.h?…
============================================================================== --- trunk/reactos/tools/sysreg/user_types.h (original) +++ trunk/reactos/tools/sysreg/user_types.h Tue Oct 24 15:45:21 2006 @@ -12,7 +12,27 @@ #include <string> #include <tchar.h> +#include <iostream> typedef std::basic_string<TCHAR> string; + typedef std::basic_istringstream<TCHAR> istringstream; + +#ifdef UNICODE + + using std::wcout; + using std::wcerr; + using std::endl; + +#define cout wcout +#define cerr wcerr + +#else + + using std::cout; + using std::cerr; + using std::endl; #endif + + +#endif // end of USER_TYPES_H__
18 years, 2 months
1
0
0
0
[janderwald] 24642: - set svn:eol-style properties - update makefile - fix warning
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 24 15:27:23 2006 New Revision: 24642 URL:
http://svn.reactos.org/svn/reactos?rev=24642&view=rev
Log: - set svn:eol-style properties - update makefile - fix warning Modified: trunk/reactos/tools/sysreg/file_reader.cpp (contents, props changed) trunk/reactos/tools/sysreg/file_reader.h (contents, props changed) trunk/reactos/tools/sysreg/sysreg.mak trunk/reactos/tools/sysreg/user_types.h (contents, props changed) Modified: trunk/reactos/tools/sysreg/file_reader.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/file_reader.c…
============================================================================== --- trunk/reactos/tools/sysreg/file_reader.cpp (original) +++ trunk/reactos/tools/sysreg/file_reader.cpp Tue Oct 24 15:27:23 2006 @@ -1,168 +1,168 @@ -/* $Id: pipe_reader.cpp 24589 2006-10-21 08:34:00Z janderwald $ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: file reading support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include "file_reader.h" -#include <assert.h> - -namespace System_ -{ -//--------------------------------------------------------------------------------------- - FileReader::FileReader() : m_File(NULL) - { - } -//--------------------------------------------------------------------------------------- - FileReader::~FileReader() - { - } -//--------------------------------------------------------------------------------------- - bool FileReader::openFile(TCHAR const * filename) - { -#ifdef UNICODE - m_File = _tfopen(filename, _T("rb,ccs=UNICODE")); -#else - m_File = _tfopen(filename, _T("rb")); -#endif - - if (m_File) - { - return true; - } - else - { - return false; - } - } -//--------------------------------------------------------------------------------------- - bool FileReader::closeFile() - { - if (!m_File) - { - return false; - } - - if (!fclose(m_File)) - { - m_File = NULL; - return true; - } - - return false; - } -//--------------------------------------------------------------------------------------- - bool FileReader::readFile(vector<string> & lines) - { - if (!m_File) - { - return false; - } - - bool ret = true; - size_t total_length = 0; - size_t line_count = lines.size(); - size_t num = 0; - char szBuffer[256]; - int readoffset = 0; - -#ifdef UNICODE - wchar_t wbuf[512]; - int wbuf_offset = 0; - - if (m_BufferedLines.length ()) - { - wcscpy(wbuf, m_BufferedLines.c_str ()); - wbuf_offset = m_BufferedLines.length (); - } -#else - if (m_BufferedLines.length()) - { - strcpy(szBuffer, m_BufferedLines.c_str()); - readoffset = m_BufferedLines.length(); - } -#endif - - do - { - if (total_length < num) - { -#ifdef UNICODE - memmove(wbuf, &wbuf[total_length], (num - total_length) * sizeof(wchar_t)); - wbuf_offset = num - total_length; -#else - memmove(szBuffer, &szBuffer[total_length], num - total_length); - readoffset = num - total_length; -#endif - } - - num = fread(&szBuffer[readoffset], - sizeof(char), sizeof(szBuffer)/sizeof(char) - (readoffset+1) * sizeof(char), - m_File); - - szBuffer[num] = L'\0'; - - if (!num) - { - if (line_count == lines.size ()) - { - ret = false; - } - break; - } - TCHAR * ptr; -#ifdef UNICODE - int i = 0; - int conv; - while((conv = mbtowc(&wbuf[wbuf_offset+i], &szBuffer[i], num))) - { - i += conv; - if (i == num) - break; - - assert(wbuf_offset + i < 512); - } - wbuf[wbuf_offset + num] = L'\0'; - - TCHAR * offset = wbuf; -#else - - TCHAR * offset = szBuffer; -#endif - total_length = 0; - while(ptr = _tcsstr(offset, _T("\x0D\x0A"))) - { - int length = ((unsigned)ptr - (unsigned)offset); - length /= sizeof(TCHAR); - - offset[length] = L'\0'; - - string line = offset; - lines.push_back (line); - - offset += length + 2; - total_length += length + 2; - - if (total_length == num) - { - break; - } - } - }while(num ); - - if (total_length < num) - { -#ifdef UNICODE - m_BufferedLines = &wbuf[total_length]; -#else - m_BufferedLines = &szBuffer[total_length]; -#endif - } - - return ret; - } - -} // end of namespace System_ +/* $Id$ + * + * PROJECT: System regression tool for ReactOS + * LICENSE: GPL - See COPYING in the top level directory + * FILE: tools/sysreg/conf_parser.h + * PURPOSE: file reading support + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) + */ + +#include "file_reader.h" +#include <assert.h> + +namespace System_ +{ +//--------------------------------------------------------------------------------------- + FileReader::FileReader() : m_File(NULL) + { + } +//--------------------------------------------------------------------------------------- + FileReader::~FileReader() + { + } +//--------------------------------------------------------------------------------------- + bool FileReader::openFile(TCHAR const * filename) + { +#ifdef UNICODE + m_File = _tfopen(filename, _T("rb,ccs=UNICODE")); +#else + m_File = _tfopen(filename, _T("rb")); +#endif + + if (m_File) + { + return true; + } + else + { + return false; + } + } +//--------------------------------------------------------------------------------------- + bool FileReader::closeFile() + { + if (!m_File) + { + return false; + } + + if (!fclose(m_File)) + { + m_File = NULL; + return true; + } + + return false; + } +//--------------------------------------------------------------------------------------- + bool FileReader::readFile(vector<string> & lines) + { + if (!m_File) + { + return false; + } + + bool ret = true; + size_t total_length = 0; + size_t line_count = lines.size(); + size_t num = 0; + char szBuffer[256]; + int readoffset = 0; + +#ifdef UNICODE + wchar_t wbuf[512]; + int wbuf_offset = 0; + + if (m_BufferedLines.length ()) + { + wcscpy(wbuf, m_BufferedLines.c_str ()); + wbuf_offset = m_BufferedLines.length (); + } +#else + if (m_BufferedLines.length()) + { + strcpy(szBuffer, m_BufferedLines.c_str()); + readoffset = m_BufferedLines.length(); + } +#endif + + do + { + if (total_length < num) + { +#ifdef UNICODE + memmove(wbuf, &wbuf[total_length], (num - total_length) * sizeof(wchar_t)); + wbuf_offset = num - total_length; +#else + memmove(szBuffer, &szBuffer[total_length], num - total_length); + readoffset = num - total_length; +#endif + } + + num = fread(&szBuffer[readoffset], + sizeof(char), sizeof(szBuffer)/sizeof(char) - (readoffset+1) * sizeof(char), + m_File); + + szBuffer[num] = L'\0'; + + if (!num) + { + if (line_count == lines.size ()) + { + ret = false; + } + break; + } + TCHAR * ptr; +#ifdef UNICODE + int i = 0; + int conv; + while((conv = mbtowc(&wbuf[wbuf_offset+i], &szBuffer[i], num))) + { + i += conv; + if (i == num) + break; + + assert(wbuf_offset + i < 512); + } + wbuf[wbuf_offset + num] = L'\0'; + + TCHAR * offset = wbuf; +#else + + TCHAR * offset = szBuffer; +#endif + total_length = 0; + while(ptr = _tcsstr(offset, _T("\x0D\x0A"))) + { + int length = ((unsigned)ptr - (unsigned)offset); + length /= sizeof(TCHAR); + + offset[length] = L'\0'; + + string line = offset; + lines.push_back (line); + + offset += length + 2; + total_length += length + 2; + + if (total_length == num) + { + break; + } + } + }while(num ); + + if (total_length < num) + { +#ifdef UNICODE + m_BufferedLines = &wbuf[total_length]; +#else + m_BufferedLines = &szBuffer[total_length]; +#endif + } + + return ret; + } + +} // end of namespace System_ Propchange: trunk/reactos/tools/sysreg/file_reader.cpp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/tools/sysreg/file_reader.cpp ------------------------------------------------------------------------------ svn:keywords = author date id revision Modified: trunk/reactos/tools/sysreg/file_reader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/file_reader.h…
============================================================================== --- trunk/reactos/tools/sysreg/file_reader.h (original) +++ trunk/reactos/tools/sysreg/file_reader.h Tue Oct 24 15:27:23 2006 @@ -1,91 +1,91 @@ -#ifndef FILE_READER_H__ -#define FILE_READER_H__ - -/* $Id: pipe_reader.h 24587 2006-10-20 21:14:08Z janderwald $ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/conf_parser.h - * PURPOSE: pipe reader support - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - - -#include "user_types.h" - -#include <vector> - -namespace System_ -{ - using std::vector; -//--------------------------------------------------------------------------------------- -/// -/// class FileReader -/// -/// Description: this class implements reading from a file - - class FileReader - { - public: -//--------------------------------------------------------------------------------------- -/// -/// FileReader -/// -/// Description: constructor of class FileReader - - FileReader(); - -//--------------------------------------------------------------------------------------- -/// -/// ~FileReader -/// -/// Description: destructor of class FileReader - - virtual ~FileReader(); - -//--------------------------------------------------------------------------------------- -/// -/// openFile -/// -/// Description: attempts to open a file. Returns true on success -/// -/// @param filename name of the file to open -/// @return bool - - bool openFile(TCHAR const * filename); - -//--------------------------------------------------------------------------------------- -/// -/// closeFile -/// -/// Description: attempts to close a file. Returns true on success -/// -/// @return bool - - bool closeFile(); - -//--------------------------------------------------------------------------------------- -/// -/// readFile -/// -/// Description: reads from file. The result is stored in a vector of strings -/// -/// Note: returns true on success -/// - - bool readFile(vector<string> & lines); - - - - protected: - FILE * m_File; - string m_BufferedLines; - - - }; // end of class FileReader - - -} // end of namespace System_ - - -#endif /* end of FILE_READER_H__ */ +#ifndef FILE_READER_H__ +#define FILE_READER_H__ + +/* $Id$ + * + * PROJECT: System regression tool for ReactOS + * LICENSE: GPL - See COPYING in the top level directory + * FILE: tools/sysreg/conf_parser.h + * PURPOSE: pipe reader support + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) + */ + + +#include "user_types.h" + +#include <vector> + +namespace System_ +{ + using std::vector; +//--------------------------------------------------------------------------------------- +/// +/// class FileReader +/// +/// Description: this class implements reading from a file + + class FileReader + { + public: +//--------------------------------------------------------------------------------------- +/// +/// FileReader +/// +/// Description: constructor of class FileReader + + FileReader(); + +//--------------------------------------------------------------------------------------- +/// +/// ~FileReader +/// +/// Description: destructor of class FileReader + + virtual ~FileReader(); + +//--------------------------------------------------------------------------------------- +/// +/// openFile +/// +/// Description: attempts to open a file. Returns true on success +/// +/// @param filename name of the file to open +/// @return bool + + bool openFile(TCHAR const * filename); + +//--------------------------------------------------------------------------------------- +/// +/// closeFile +/// +/// Description: attempts to close a file. Returns true on success +/// +/// @return bool + + bool closeFile(); + +//--------------------------------------------------------------------------------------- +/// +/// readFile +/// +/// Description: reads from file. The result is stored in a vector of strings +/// +/// Note: returns true on success +/// + + bool readFile(vector<string> & lines); + + + + protected: + FILE * m_File; + string m_BufferedLines; + + + }; // end of class FileReader + + +} // end of namespace System_ + + +#endif /* end of FILE_READER_H__ */ Propchange: trunk/reactos/tools/sysreg/file_reader.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/tools/sysreg/file_reader.h ------------------------------------------------------------------------------ svn:keywords = author date id revision Modified: trunk/reactos/tools/sysreg/sysreg.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sysreg.mak?re…
============================================================================== --- trunk/reactos/tools/sysreg/sysreg.mak (original) +++ trunk/reactos/tools/sysreg/sysreg.mak Tue Oct 24 15:27:23 2006 @@ -25,6 +25,7 @@ rosboot_test.cpp \ sym_file.cpp \ sysreg.cpp \ + file_reader.cpp \ ) SYSREGBUILD_OBJECTS = \ @@ -66,6 +67,10 @@ $(ECHO_CC) ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@ +$(SYSREGBUILD_INT_)file_reader.o: $(SYSREGBUILD_BASE_)file_reader.cpp | $(SYSREGBUILD_INT) + $(ECHO_CC) + ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@ + .PHONY: sysregbuild_clean sysreg_clean: -@$(rm) $(SYSREGBUILD_TARGET) $(SYSREGBUILD_OBJECTS) 2>$(NUL) Modified: trunk/reactos/tools/sysreg/user_types.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/user_types.h?…
============================================================================== --- trunk/reactos/tools/sysreg/user_types.h (original) +++ trunk/reactos/tools/sysreg/user_types.h Tue Oct 24 15:27:23 2006 @@ -1,19 +1,18 @@ -#ifndef USER_TYPES_H__ -#define USER_TYPES_H__ - -/* $Id: rosboot_test.cpp 24585 2006-10-20 19:40:33Z janderwald $ - * - * PROJECT: System regression tool for ReactOS - * LICENSE: GPL - See COPYING in the top level directory - * FILE: tools/sysreg/user_types.h - * PURPOSE: user types - * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) - */ - -#include <string> -#include <tchar.h> - - typedef std::basic_string<TCHAR> string; - - -#endif +#ifndef USER_TYPES_H__ +#define USER_TYPES_H__ + +/* $Id$ + * + * PROJECT: System regression tool for ReactOS + * LICENSE: GPL - See COPYING in the top level directory + * FILE: tools/sysreg/user_types.h + * PURPOSE: user types + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) + */ + +#include <string> +#include <tchar.h> + + typedef std::basic_string<TCHAR> string; + +#endif Propchange: trunk/reactos/tools/sysreg/user_types.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/tools/sysreg/user_types.h ------------------------------------------------------------------------------ svn:keywords = author date id revision
18 years, 2 months
1
0
0
0
[janderwald] 24641: - fix typo in config file - implement ROSBOOT_CRITICAL_APP - implement a class which is responsible for file reading -
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Oct 24 15:21:17 2006 New Revision: 24641 URL:
http://svn.reactos.org/svn/reactos?rev=24641&view=rev
Log: - fix typo in config file - implement ROSBOOT_CRITICAL_APP - implement a class which is responsible for file reading - Added: trunk/reactos/tools/sysreg/file_reader.cpp trunk/reactos/tools/sysreg/file_reader.h trunk/reactos/tools/sysreg/user_types.h Modified: trunk/reactos/tools/sysreg/conf_parser.cpp trunk/reactos/tools/sysreg/conf_parser.h trunk/reactos/tools/sysreg/pipe_reader.h trunk/reactos/tools/sysreg/rosboot_test.cpp trunk/reactos/tools/sysreg/rosboot_test.h trunk/reactos/tools/sysreg/sample.cfg Modified: trunk/reactos/tools/sysreg/conf_parser.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/conf_parser.c…
============================================================================== --- trunk/reactos/tools/sysreg/conf_parser.cpp (original) +++ trunk/reactos/tools/sysreg/conf_parser.cpp Tue Oct 24 15:21:17 2006 @@ -65,7 +65,7 @@ buf = _fgetts(buffer, sizeof(buffer) / sizeof(TCHAR), file); if (buf) { - if (buffer[0] != ';') + if (buffer[0] != _T(';')) { string s_buffer = string(buffer); string::size_type ws_pos = s_buffer.find_first_of (_T("=")); Modified: trunk/reactos/tools/sysreg/conf_parser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/conf_parser.h…
============================================================================== --- trunk/reactos/tools/sysreg/conf_parser.h (original) +++ trunk/reactos/tools/sysreg/conf_parser.h Tue Oct 24 15:21:17 2006 @@ -10,7 +10,7 @@ * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) */ - +#include "user_types.h" #include <string> #include <map> #include <tchar.h> Added: trunk/reactos/tools/sysreg/file_reader.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/file_reader.c…
============================================================================== --- trunk/reactos/tools/sysreg/file_reader.cpp (added) +++ trunk/reactos/tools/sysreg/file_reader.cpp Tue Oct 24 15:21:17 2006 @@ -1,0 +1,168 @@ +/* $Id: pipe_reader.cpp 24589 2006-10-21 08:34:00Z janderwald $ + * + * PROJECT: System regression tool for ReactOS + * LICENSE: GPL - See COPYING in the top level directory + * FILE: tools/sysreg/conf_parser.h + * PURPOSE: file reading support + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) + */ + +#include "file_reader.h" +#include <assert.h> + +namespace System_ +{ +//--------------------------------------------------------------------------------------- + FileReader::FileReader() : m_File(NULL) + { + } +//--------------------------------------------------------------------------------------- + FileReader::~FileReader() + { + } +//--------------------------------------------------------------------------------------- + bool FileReader::openFile(TCHAR const * filename) + { +#ifdef UNICODE + m_File = _tfopen(filename, _T("rb,ccs=UNICODE")); +#else + m_File = _tfopen(filename, _T("rb")); +#endif + + if (m_File) + { + return true; + } + else + { + return false; + } + } +//--------------------------------------------------------------------------------------- + bool FileReader::closeFile() + { + if (!m_File) + { + return false; + } + + if (!fclose(m_File)) + { + m_File = NULL; + return true; + } + + return false; + } +//--------------------------------------------------------------------------------------- + bool FileReader::readFile(vector<string> & lines) + { + if (!m_File) + { + return false; + } + + bool ret = true; + size_t total_length = 0; + size_t line_count = lines.size(); + size_t num = 0; + char szBuffer[256]; + int readoffset = 0; + +#ifdef UNICODE + wchar_t wbuf[512]; + int wbuf_offset = 0; + + if (m_BufferedLines.length ()) + { + wcscpy(wbuf, m_BufferedLines.c_str ()); + wbuf_offset = m_BufferedLines.length (); + } +#else + if (m_BufferedLines.length()) + { + strcpy(szBuffer, m_BufferedLines.c_str()); + readoffset = m_BufferedLines.length(); + } +#endif + + do + { + if (total_length < num) + { +#ifdef UNICODE + memmove(wbuf, &wbuf[total_length], (num - total_length) * sizeof(wchar_t)); + wbuf_offset = num - total_length; +#else + memmove(szBuffer, &szBuffer[total_length], num - total_length); + readoffset = num - total_length; +#endif + } + + num = fread(&szBuffer[readoffset], + sizeof(char), sizeof(szBuffer)/sizeof(char) - (readoffset+1) * sizeof(char), + m_File); + + szBuffer[num] = L'\0'; + + if (!num) + { + if (line_count == lines.size ()) + { + ret = false; + } + break; + } + TCHAR * ptr; +#ifdef UNICODE + int i = 0; + int conv; + while((conv = mbtowc(&wbuf[wbuf_offset+i], &szBuffer[i], num))) + { + i += conv; + if (i == num) + break; + + assert(wbuf_offset + i < 512); + } + wbuf[wbuf_offset + num] = L'\0'; + + TCHAR * offset = wbuf; +#else + + TCHAR * offset = szBuffer; +#endif + total_length = 0; + while(ptr = _tcsstr(offset, _T("\x0D\x0A"))) + { + int length = ((unsigned)ptr - (unsigned)offset); + length /= sizeof(TCHAR); + + offset[length] = L'\0'; + + string line = offset; + lines.push_back (line); + + offset += length + 2; + total_length += length + 2; + + if (total_length == num) + { + break; + } + } + }while(num ); + + if (total_length < num) + { +#ifdef UNICODE + m_BufferedLines = &wbuf[total_length]; +#else + m_BufferedLines = &szBuffer[total_length]; +#endif + } + + return ret; + } + +} // end of namespace System_ Added: trunk/reactos/tools/sysreg/file_reader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/file_reader.h…
============================================================================== --- trunk/reactos/tools/sysreg/file_reader.h (added) +++ trunk/reactos/tools/sysreg/file_reader.h Tue Oct 24 15:21:17 2006 @@ -1,0 +1,91 @@ +#ifndef FILE_READER_H__ +#define FILE_READER_H__ + +/* $Id: pipe_reader.h 24587 2006-10-20 21:14:08Z janderwald $ + * + * PROJECT: System regression tool for ReactOS + * LICENSE: GPL - See COPYING in the top level directory + * FILE: tools/sysreg/conf_parser.h + * PURPOSE: pipe reader support + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) + */ + + +#include "user_types.h" + +#include <vector> + +namespace System_ +{ + using std::vector; +//--------------------------------------------------------------------------------------- +/// +/// class FileReader +/// +/// Description: this class implements reading from a file + + class FileReader + { + public: +//--------------------------------------------------------------------------------------- +/// +/// FileReader +/// +/// Description: constructor of class FileReader + + FileReader(); + +//--------------------------------------------------------------------------------------- +/// +/// ~FileReader +/// +/// Description: destructor of class FileReader + + virtual ~FileReader(); + +//--------------------------------------------------------------------------------------- +/// +/// openFile +/// +/// Description: attempts to open a file. Returns true on success +/// +/// @param filename name of the file to open +/// @return bool + + bool openFile(TCHAR const * filename); + +//--------------------------------------------------------------------------------------- +/// +/// closeFile +/// +/// Description: attempts to close a file. Returns true on success +/// +/// @return bool + + bool closeFile(); + +//--------------------------------------------------------------------------------------- +/// +/// readFile +/// +/// Description: reads from file. The result is stored in a vector of strings +/// +/// Note: returns true on success +/// + + bool readFile(vector<string> & lines); + + + + protected: + FILE * m_File; + string m_BufferedLines; + + + }; // end of class FileReader + + +} // end of namespace System_ + + +#endif /* end of FILE_READER_H__ */ Modified: trunk/reactos/tools/sysreg/pipe_reader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/pipe_reader.h…
============================================================================== --- trunk/reactos/tools/sysreg/pipe_reader.h (original) +++ trunk/reactos/tools/sysreg/pipe_reader.h Tue Oct 24 15:21:17 2006 @@ -6,7 +6,7 @@ * PROJECT: System regression tool for ReactOS * LICENSE: GPL - See COPYING in the top level directory * FILE: tools/sysreg/conf_parser.h - * PURPOSE: pipe reader support + * PURPOSE: file reading support * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) */ Modified: trunk/reactos/tools/sysreg/rosboot_test.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.cpp (original) +++ trunk/reactos/tools/sysreg/rosboot_test.cpp Tue Oct 24 15:21:17 2006 @@ -12,6 +12,7 @@ #include "rosboot_test.h" #include "pipe_reader.h" #include "sym_file.h" +#include "file_reader.h" #include <iostream> #include <vector> @@ -46,6 +47,7 @@ using std::vector; using System_::PipeReader; using System_::SymbolFile; + using System_::FileReader; string RosBootTest::VARIABLE_NAME = _T("ROSBOOT_CMD"); string RosBootTest::CLASS_NAME = _T("rosboot"); @@ -56,6 +58,7 @@ string RosBootTest::DELAY_READ = _T("ROSBOOT_DELAY_READ"); string RosBootTest::CHECK_POINT = _T("ROSBOOT_CHECK_POINT"); string RosBootTest::SYSREG_CHECKPOINT = _T("SYSREG_CHECKPOINT:"); + string RosBootTest::CRITICAL_APP = _T("ROSBOOT_CRITICAL_APP"); //--------------------------------------------------------------------------------------- RosBootTest::RosBootTest() : RegressionTest(RosBootTest::CLASS_NAME), m_Timeout(60.0), m_Delayread(0) @@ -123,6 +126,7 @@ conf_parser.getStringValue (RosBootTest::CHECK_POINT, m_Checkpoint); conf_parser.getStringValue (RosBootTest::PID_FILE, m_PidFile); + conf_parser.getStringValue (RosBootTest::CRITICAL_APP, m_CriticalApp); if (!_tcscmp(debug_port.c_str(), _T("pipe"))) @@ -203,6 +207,15 @@ } else if (line.find (_T("Unhandled exception")) != string::npos) { + if (m_CriticalApp == _T("IGNORE")) + { + /// + /// ignoring all user-mode exceptions + /// + continue; + } + + if (i + 3 >= debug_data.size ()) { /// @@ -211,9 +224,6 @@ clear = false; break; } - - cerr << "UM detected" <<endl; - state = DebugStateUMEDetected; /// /// extract address from next line @@ -224,8 +234,7 @@ if (pos == string::npos) { cerr << "Error: trace is not available (corrupted debug info" << endl; - dumpCheckpoints(); - break; + continue; } @@ -240,20 +249,30 @@ if (pos == string::npos) { cerr << "Error: trace is not available (corrupted debug info" << endl; - dumpCheckpoints(); - break; - } - - modulename = modulename.substr (pos + 1, modulename.length () - pos); - pos = modulename.find_last_of (_T(".")); + continue; + } + + string appname = modulename.substr (pos + 1, modulename.length () - pos); + if (m_CriticalApp.find (appname) == string::npos && m_CriticalApp.length () > 1) + { + /// the application is not in the list of + /// critical apps. Therefore we ignore the user-mode + /// exception + + continue; + } + + pos = appname.find_last_of (_T(".")); if (pos == string::npos) { cerr << "Error: trace is not available (corrupted debug info" << endl; - dumpCheckpoints(); - break; - } - - modulename = modulename.substr (0, pos); + continue; + } + + modulename = appname.substr (0, pos); + + cerr << "UM detected" <<endl; + state = DebugStateUMEDetected; /// /// resolve address @@ -382,57 +401,35 @@ if (m_PidFile != _T("")) { - FILE * pidfile = _tfopen(m_PidFile.c_str (), _T("rt")); - if (pidfile) - { - TCHAR szBuffer[20]; - if (_fgetts(szBuffer, sizeof(szBuffer) / sizeof(TCHAR), pidfile)) - { - pid = _ttoi(szBuffer); - } - - } - fclose(pidfile); - } - - FILE * file = _tfopen(debug_log.c_str (), _T("rt")); - if (!file) + FileReader file; + if (file.openFile(m_PidFile.c_str ())) + { + vector<string> lines; + file.readFile(lines); + if (lines.size()) + { + string line = lines[0]; + pid = _ttoi(line.c_str ()); + } + file.closeFile(); + } + } + FileReader file; + if (!file.openFile (debug_log.c_str ())) { cerr << "Error: failed to open debug log " << debug_log << endl; pipe_reader.closePipe (); return false; } - TCHAR szBuffer[1000]; + vector<string> lines; bool ret = true; - vector<string> vect; while(!pipe_reader.isEof ()) { - if (_fgetts(szBuffer, sizeof(szBuffer) / sizeof(TCHAR), file)) - { - - string line = szBuffer; - - while(line.find (_T("\x10")) != string::npos) - { - line.erase(line.find(_T("\x10")), 1); - } - - if (line[0] != _T('(') && vect.size() >=1) - { - string prev = vect[vect.size () -1]; - prev.insert (prev.length ()-1, line); - vect.pop_back (); - vect.push_back (prev); - - } - else - { - vect.push_back (line); - } - - DebugState state = checkDebugData(vect); + if (file.readFile (lines)) + { + DebugState state = checkDebugData(lines); if (state == DebugStateBSODDetected || state == DebugStateUMEDetected) { @@ -443,14 +440,26 @@ { break; } - - if (isTimeout(m_Timeout)) - { - break; - } - } - } - fclose(file); + } + if (isTimeout(m_Timeout)) + { + /// + /// timeout has been reached + /// + if (m_Checkpoint != _T("")) + { + /// + /// timeout was reached but + /// the checkpoint was not reached + /// we see this as a "hang" + /// + ret = false; + } + break; + } + } + file.closeFile (); + if (pid) { #ifdef __LINUX__ Modified: trunk/reactos/tools/sysreg/rosboot_test.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/rosboot_test.…
============================================================================== --- trunk/reactos/tools/sysreg/rosboot_test.h (original) +++ trunk/reactos/tools/sysreg/rosboot_test.h Tue Oct 24 15:21:17 2006 @@ -37,6 +37,7 @@ static string CHECK_POINT; static string SYSREG_CHECKPOINT; static string DELAY_READ; + static string CRITICAL_APP; //--------------------------------------------------------------------------------------- /// @@ -138,6 +139,7 @@ double m_Timeout; string m_PidFile; string m_Checkpoint; + string m_CriticalApp; vector <string> m_Checkpoints; unsigned long m_Delayread; Modified: trunk/reactos/tools/sysreg/sample.cfg URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/sample.cfg?re…
============================================================================== --- trunk/reactos/tools/sysreg/sample.cfg (original) +++ trunk/reactos/tools/sysreg/sample.cfg Tue Oct 24 15:21:17 2006 @@ -77,9 +77,12 @@ ; This variable is the maximum runtime of the ROSBOOT_CMD. If the command ; runs longer than this value, sysreg exits with success mode; ; +; Note: if you set the variable ROSBOOT_CHECK_POINT and the checkpoint is not reached +; within this time, sysreg exits with failure mode +; ; If the variable is not set, the default timeout is 1 minute ; -ROSBOOT_TIME_OUT=180.0 +ROSBOOT_TIME_OUT=30.0 ; ROSBOOT_CHECK_POINT ; @@ -88,7 +91,23 @@ ; ; CP_NAME is the value of the ROSBOOT_CHECK_POINT variable -ROSBOOT_CHECKPOINT=USETUP_COMPLETED +ROSBOOT_CHECK_POINT=USETUP_COMPLETE + +; ROSBOOT_CRITICAL_APP +; +; If an user-mode exception occurs in an critical application, i.e. setup.exe / explorer.exe, sysreg will report +; that the test has failed and quit debugging immediately +; +; if an user-mode exception occurs in any other application, sysreg will report the exception but the exception +; has no effect on the test result +; +; Note: if the value is set to IGNORE, sysreg will ignore all user-mode exceptions +; +; Note: if the variable is not set, then sysreg will stop on the first user-mode exception +; +; seperate each application with an space +ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe +;ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe lsass.exe Added: trunk/reactos/tools/sysreg/user_types.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/user_types.h?…
============================================================================== --- trunk/reactos/tools/sysreg/user_types.h (added) +++ trunk/reactos/tools/sysreg/user_types.h Tue Oct 24 15:21:17 2006 @@ -1,0 +1,19 @@ +#ifndef USER_TYPES_H__ +#define USER_TYPES_H__ + +/* $Id: rosboot_test.cpp 24585 2006-10-20 19:40:33Z janderwald $ + * + * PROJECT: System regression tool for ReactOS + * LICENSE: GPL - See COPYING in the top level directory + * FILE: tools/sysreg/user_types.h + * PURPOSE: user types + * PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at) + */ + +#include <string> +#include <tchar.h> + + typedef std::basic_string<TCHAR> string; + + +#endif
18 years, 2 months
1
0
0
0
[ion] 24640: - Optimize PsGetCurrentProcess as well.
by ion@svn.reactos.org
Author: ion Date: Tue Oct 24 02:07:45 2006 New Revision: 24640 URL:
http://svn.reactos.org/svn/reactos?rev=24640&view=rev
Log: - Optimize PsGetCurrentProcess as well. Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h trunk/reactos/ntoskrnl/include/internal/ps_x.h Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Tue Oct 24 02:07:45 2006 @@ -17,8 +17,10 @@ #ifdef _NTOSKRNL_ -#define KeGetCurrentThread _KeGetCurrentThread -#define KeGetPreviousMode _KeGetPreviousMode +#define KeGetCurrentThread _KeGetCurrentThread +#define KeGetPreviousMode _KeGetPreviousMode +#undef PsGetCurrentProcess +#define PsGetCurrentProcess _PsGetCurrentProcess #include "ke.h" #include "i386/mm.h" Modified: trunk/reactos/ntoskrnl/include/internal/ps_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ps_x.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ps_x.h Tue Oct 24 02:07:45 2006 @@ -179,3 +179,11 @@ /* Leave Critical Thread */ KeLeaveCriticalRegion(); } + +PEPROCESS +FORCEINLINE +_PsGetCurrentProcess(VOID) +{ + /* Get the current process */ + return (PEPROCESS)KeGetCurrentThread()->ApcState.Process; +}
18 years, 2 months
1
0
0
0
[ion] 24639: - Properly implement inline versions of KeGetCurrentThread and KeGetPreviousMode/ExGetPreviousMode, as well as KeGetPcr. This should significantly increase performance. (KeGetPreviousMode is reduced to 2 lines of code instead of 15 lines with 2 expensive jumps).
by ion@svn.reactos.org
Author: ion Date: Tue Oct 24 02:01:25 2006 New Revision: 24639 URL:
http://svn.reactos.org/svn/reactos?rev=24639&view=rev
Log: - Properly implement inline versions of KeGetCurrentThread and KeGetPreviousMode/ExGetPreviousMode, as well as KeGetPcr. This should significantly increase performance. (KeGetPreviousMode is reduced to 2 lines of code instead of 15 lines with 2 expensive jumps). Modified: trunk/reactos/include/ddk/winddk.h trunk/reactos/include/ndk/ketypes.h trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/include/internal/ex.h trunk/reactos/ntoskrnl/include/internal/ke_x.h trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h trunk/reactos/ntoskrnl/ke/thrdobj.c Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
============================================================================== --- trunk/reactos/include/ddk/winddk.h (original) +++ trunk/reactos/include/ddk/winddk.h Tue Oct 24 02:01:25 2006 @@ -8679,12 +8679,6 @@ VOID); NTKERNELAPI -KPROCESSOR_MODE -NTAPI -KeGetPreviousMode( - VOID); - -NTKERNELAPI ULONG NTAPI KeGetRecommendedSharedDataAlignment( Modified: trunk/reactos/include/ndk/ketypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ketypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/ketypes.h (original) +++ trunk/reactos/include/ndk/ketypes.h Tue Oct 24 02:01:25 2006 @@ -95,7 +95,7 @@ // #define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS)) #define PCR ((volatile KPCR * const)K0IPCR) -#ifdef _WE_USE_THE_SAME_PCR_ADDRESS +#if !defined(CONFIG_SMP) && !defined(NT_BUILD) #define KeGetPcr() PCR #else #define KeGetPcr() ((volatile KPCR * const)__readfsdword(0x1C)) Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c Tue Oct 24 02:01:25 2006 @@ -30,11 +30,12 @@ /* * @implemented */ +#undef ExGetPreviousMode KPROCESSOR_MODE NTAPI ExGetPreviousMode (VOID) { - return (KPROCESSOR_MODE)PsGetCurrentThread()->Tcb.PreviousMode; + return KeGetPreviousMode(); } /* Modified: trunk/reactos/ntoskrnl/include/internal/ex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ex.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ex.h Tue Oct 24 02:01:25 2006 @@ -47,6 +47,7 @@ #define ExInitializeRundownProtection _ExInitializeRundownProtection #define ExWaitForRundownProtectionRelease _ExWaitForRundownProtectionRelease #define ExRundownCompleted _ExRundownCompleted +#define ExGetPreviousMode KeGetPreviousMode /* INITIALIZATION FUNCTIONS *************************************************/ Modified: trunk/reactos/ntoskrnl/include/internal/ke_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ke_x.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ke_x.h Tue Oct 24 02:01:25 2006 @@ -1263,3 +1263,18 @@ return Priority; } +PRKTHREAD +FORCEINLINE +KeGetCurrentThread(VOID) +{ + /* Return the current thread */ + return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread; +} + +UCHAR +FORCEINLINE +KeGetPreviousMode(VOID) +{ + /* Return the current mode */ + return KeGetCurrentThread()->PreviousMode; +} Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h Tue Oct 24 02:01:25 2006 @@ -16,6 +16,9 @@ #endif #ifdef _NTOSKRNL_ + +#define KeGetCurrentThread _KeGetCurrentThread +#define KeGetPreviousMode _KeGetPreviousMode #include "ke.h" #include "i386/mm.h" Modified: trunk/reactos/ntoskrnl/ke/thrdobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdobj.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/thrdobj.c (original) +++ trunk/reactos/ntoskrnl/ke/thrdobj.c Tue Oct 24 02:01:25 2006 @@ -882,18 +882,19 @@ KeGetCurrentThread(VOID) { /* Return the current thread on this PCR */ - return ((PKIPCR)KeGetPcr())->PrcbData.CurrentThread; + return _KeGetCurrentThread(); } /* * @implemented */ -KPROCESSOR_MODE +#undef KeGetPreviousMode +UCHAR NTAPI KeGetPreviousMode(VOID) { /* Return the previous mode of this thread */ - return KeGetCurrentThread()->PreviousMode; + return _KeGetPreviousMode(); } /*
18 years, 2 months
1
0
0
0
[ion] 24638: - Fix/add some remaining prototypes. - Add all the Nt functions to sysfuncs.lst and fixup some entries which were out-of-order. Unless I skipped anything (might've skipped 1 or 2 APIs), we should now have the same system call table as Windows 2003 SP1 (useful for my testing of ntdll.dll inside Windows).
by ion@svn.reactos.org
Author: ion Date: Tue Oct 24 01:28:17 2006 New Revision: 24638 URL:
http://svn.reactos.org/svn/reactos?rev=24638&view=rev
Log: - Fix/add some remaining prototypes. - Add all the Nt functions to sysfuncs.lst and fixup some entries which were out-of-order. Unless I skipped anything (might've skipped 1 or 2 APIs), we should now have the same system call table as Windows 2003 SP1 (useful for my testing of ntdll.dll inside Windows). Modified: trunk/reactos/include/ndk/iofuncs.h trunk/reactos/include/ndk/psfuncs.h trunk/reactos/ntoskrnl/ps/psmgr.c trunk/reactos/tools/nci/sysfuncs.lst Modified: trunk/reactos/include/ndk/iofuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/iofuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/iofuncs.h (original) +++ trunk/reactos/include/ndk/iofuncs.h Tue Oct 24 01:28:17 2006 @@ -40,7 +40,7 @@ NTSTATUS NTAPI NtAddDriverEntry( - IN PBOOT_ENTRY BootEntry, + IN PEFI_DRIVER_ENTRY BootEntry, IN ULONG Id ); Modified: trunk/reactos/include/ndk/psfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/psfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/psfuncs.h (original) +++ trunk/reactos/include/ndk/psfuncs.h Tue Oct 24 01:28:17 2006 @@ -121,6 +121,14 @@ NtAlertResumeThread( IN HANDLE ThreadHandle, OUT PULONG SuspendCount +); + +typedef ULONG APPHELPCACHESERVICECLASS; +NTSTATUS +NTAPI +NtApphelpCacheControl( + IN APPHELPCACHESERVICECLASS Service, + IN PVOID ServiceData ); NTSYSCALLAPI Modified: trunk/reactos/ntoskrnl/ps/psmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ps/psmgr.c (original) +++ trunk/reactos/ntoskrnl/ps/psmgr.c Tue Oct 24 01:28:17 2006 @@ -530,11 +530,10 @@ return (NtBuildNumber >> 28) == 0xC; } -typedef ULONG APPHELPCACHESERVICECLASS; NTSTATUS NTAPI -NtApphelpCacheControl(APPHELPCACHESERVICECLASS Service, - PVOID ServiceData) +NtApphelpCacheControl(IN APPHELPCACHESERVICECLASS Service, + IN PVOID ServiceData) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; Modified: trunk/reactos/tools/nci/sysfuncs.lst URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/sysfuncs.lst?rev…
============================================================================== --- trunk/reactos/tools/nci/sysfuncs.lst (original) +++ trunk/reactos/tools/nci/sysfuncs.lst Tue Oct 24 01:28:17 2006 @@ -1,15 +1,24 @@ NtAcceptConnectPort 6 NtAccessCheck 8 NtAccessCheckAndAuditAlarm 11 +NtAccessCheckByType 11 +NtAccessCheckByTypeAndAuditAlarm 16 +NtAccessCheckByTypeResultList 11 +NtAccessCheckByTypeResultListAndAuditAlarm 16 +NtAccessCheckByTypeResultListAndAuditAlarmByHandle 17 NtAddAtom 3 NtAddBootEntry 2 +NtAddDriverEntry 2 NtAdjustGroupsToken 6 NtAdjustPrivilegesToken 6 NtAlertResumeThread 2 NtAlertThread 1 NtAllocateLocallyUniqueId 1 +NtAllocateUserPhysicalPages 3 NtAllocateUuids 4 NtAllocateVirtualMemory 6 +NtApphelpCacheControl 2 +NtAreMappedFilesTheSame 2 NtAssignProcessToJobObject 2 NtCallbackReturn 3 NtCancelIoFile 2 @@ -17,8 +26,10 @@ NtClearEvent 1 NtClose 1 NtCloseObjectAuditAlarm 3 +NtCompactKeys 2 NtCompareTokens 3 NtCompleteConnectPort 1 +NtCompressKey 1 NtConnectPort 8 NtContinue 2 NtCreateDebugObject 4 @@ -28,6 +39,7 @@ NtCreateFile 11 NtCreateIoCompletion 4 NtCreateJobObject 3 +NtCreateJobSet 3 NtCreateKey 7 NtCreateMailslotFile 8 NtCreateMutant 4 @@ -35,6 +47,7 @@ NtCreatePagingFile 4 NtCreatePort 5 NtCreateProcess 8 +NtCreateProcessEx 9 NtCreateProfile 9 NtCreateSection 7 NtCreateSemaphore 5 @@ -47,7 +60,8 @@ NtDebugContinue 3 NtDelayExecution 2 NtDeleteAtom 1 -NtDeleteBootEntry 2 +NtDeleteBootEntry 1 +NtDeleteDriverEntry 1 NtDeleteFile 1 NtDeleteKey 1 NtDeleteObjectAuditAlarm 3 @@ -57,37 +71,51 @@ NtDuplicateObject 7 NtDuplicateToken 6 NtEnumerateBootEntries 2 +NtEnumerateDriverEntries 2 NtEnumerateKey 6 +NtEnumerateSystemEnvironmentValuesEx 3 NtEnumerateValueKey 6 NtExtendSection 2 +NtFilterToken 6 NtFindAtom 3 NtFlushBuffersFile 2 NtFlushInstructionCache 3 NtFlushKey 1 NtFlushVirtualMemory 4 NtFlushWriteBuffer 0 +NtFreeUserPhysicalPages 3 NtFreeVirtualMemory 4 NtFsControlFile 10 NtGetContextThread 2 +NtGetDevicePowerState 2 NtGetPlugPlayEvent 4 -NtGetTickCount 0 +NtGetWriteWatch 7 NtImpersonateAnonymousToken 1 NtImpersonateClientOfPort 2 NtImpersonateThread 3 NtInitializeRegistry 1 NtInitiatePowerAction 4 NtIsProcessInJob 2 +NtIsSystemResumeAutomatic 0 NtListenPort 2 NtLoadDriver 1 NtLoadKey 2 NtLoadKey2 3 +NtLoadKeyEx 3 NtLockFile 10 +NtLockProductActivationKeys 2 +NtLockRegistryKey 1 NtLockVirtualMemory 4 NtMakePermanentObject 1 NtMakeTemporaryObject 1 +NtMapUserPhysicalPages 3 +NtMapUserPhysicalPagesScatter 3 NtMapViewOfSection 10 +NtModifyBootEntry 1 +NtModifyDriverEntry 1 NtNotifyChangeDirectoryFile 9 NtNotifyChangeKey 10 +NtNotifyChangeMultipleKeys 12 NtOpenDirectoryObject 3 NtOpenEvent 3 NtOpenEventPair 3 @@ -114,7 +142,6 @@ NtPrivilegeObjectAuditAlarm 6 NtProtectVirtualMemory 5 NtPulseEvent 2 -NtQueryInformationAtom 5 NtQueryAttributesFile 2 NtQueryBootEntryOrder 2 NtQueryBootOptions 2 @@ -123,9 +150,11 @@ NtQueryDefaultUILanguage 1 NtQueryDirectoryFile 11 NtQueryDirectoryObject 7 +NtQueryDriverEntryOrder 2 NtQueryEaFile 9 NtQueryEvent 5 NtQueryFullAttributesFile 2 +NtQueryInformationAtom 5 NtQueryInformationFile 5 NtQueryInformationJobObject 5 NtQueryInformationPort 5 @@ -139,6 +168,8 @@ NtQueryMultipleValueKey 6 NtQueryMutant 5 NtQueryObject 5 +NtQueryOpenSubKeys 2 +NtQueryOpenSubKeysEx 2 NtQueryPerformanceCounter 2 NtQueryQuotaInformationFile 9 NtQuerySection 5 @@ -146,6 +177,7 @@ NtQuerySemaphore 5 NtQuerySymbolicLinkObject 3 NtQuerySystemEnvironmentValue 4 +NtQuerySystemEnvironmentValueEx 5 NtQuerySystemInformation 4 NtQuerySystemTime 1 NtQueryTimer 5 @@ -172,43 +204,50 @@ NtReplyWaitReplyPort 2 NtRequestPort 2 NtRequestWaitReplyPort 3 +NtRequestWakeupLatency 1 NtResetEvent 2 +NtResetWriteWatch 3 NtRestoreKey 3 NtResumeProcess 1 NtResumeThread 2 NtSaveKey 2 NtSaveKeyEx 3 +NtSaveMergedKeys 3 NtSecureConnectPort 9 NtSetBootEntryOrder 2 NtSetBootOptions 2 +NtSetContextThread 2 NtSetDebugFilterState 3 -NtSetIoCompletion 5 -NtSetContextThread 2 NtSetDefaultHardErrorPort 1 NtSetDefaultLocale 2 NtSetDefaultUILanguage 1 +NtSetDriverEntryOrder 2 NtSetEaFile 4 NtSetEvent 2 +NtSetEventBoostPriority 1 NtSetHighEventPair 1 NtSetHighWaitLowEventPair 1 NtSetInformationDebugObject 5 NtSetInformationFile 5 +NtSetInformationJobObject 4 NtSetInformationKey 4 -NtSetInformationJobObject 4 NtSetInformationObject 4 NtSetInformationProcess 4 NtSetInformationThread 4 NtSetInformationToken 4 NtSetIntervalProfile 2 +NtSetIoCompletion 5 NtSetLdtEntries 6 NtSetLowEventPair 1 NtSetLowWaitHighEventPair 1 NtSetQuotaInformationFile 4 NtSetSecurityObject 3 NtSetSystemEnvironmentValue 2 +NtSetSystemEnvironmentValueEx 2 NtSetSystemInformation 3 NtSetSystemPowerState 3 NtSetSystemTime 2 +NtSetThreadExecutionState 2 NtSetTimer 7 NtSetTimerResolution 3 NtSetUuidSeed 1 @@ -229,6 +268,8 @@ NtTranslateFilePath 3 NtUnloadDriver 1 NtUnloadKey 1 +NtUnloadKey2 2 +NtUnloadKeyEx 2 NtUnlockFile 5 NtUnlockVirtualMemory 4 NtUnmapViewOfSection 2 @@ -242,5 +283,11 @@ NtWriteFileGather 9 NtWriteRequestData 6 NtWriteVirtualMemory 5 -NtW32Call 5 NtYieldExecution 0 +NtCreateKeyedEvent 4 +NtOpenKeyedEvent 3 +NtReleaseKeyedEvent 4 +NtWaitForKeyedEvent 4 +NtQueryPortInformationProcess 0 +NtGetCurrentProcessorNumber 0 +NtWaitForMultipleObjects32 5
18 years, 2 months
1
0
0
0
[ion] 24637: - Add some missing definitions to our NTIFS.h.
by ion@svn.reactos.org
Author: ion Date: Tue Oct 24 01:24:16 2006 New Revision: 24637 URL:
http://svn.reactos.org/svn/reactos?rev=24637&view=rev
Log: - Add some missing definitions to our NTIFS.h. Modified: trunk/reactos/include/ddk/ntifs.h trunk/reactos/include/ndk/sefuncs.h trunk/reactos/ntoskrnl/se/semgr.c Modified: trunk/reactos/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=24…
============================================================================== --- trunk/reactos/include/ddk/ntifs.h (original) +++ trunk/reactos/include/ddk/ntifs.h Tue Oct 24 01:24:16 2006 @@ -4513,6 +4513,70 @@ IN ULONG Protect ); +NTSTATUS +NTAPI +NtAccessCheckByTypeAndAuditAlarm( + IN PUNICODE_STRING SubsystemName, + IN HANDLE HandleId, + IN PUNICODE_STRING ObjectTypeName, + IN PUNICODE_STRING ObjectName, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSID PrincipalSelfSid, + IN ACCESS_MASK DesiredAccess, + IN AUDIT_EVENT_TYPE AuditType, + IN ULONG Flags, + IN POBJECT_TYPE_LIST ObjectTypeList, + IN ULONG ObjectTypeLength, + IN PGENERIC_MAPPING GenericMapping, + IN BOOLEAN ObjectCreation, + OUT PACCESS_MASK GrantedAccess, + OUT PNTSTATUS AccessStatus, + OUT PBOOLEAN GenerateOnClose +); + +NTSTATUS +NTAPI +NtAccessCheckByTypeResultListAndAuditAlarm( + IN PUNICODE_STRING SubsystemName, + IN HANDLE HandleId, + IN PUNICODE_STRING ObjectTypeName, + IN PUNICODE_STRING ObjectName, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSID PrincipalSelfSid, + IN ACCESS_MASK DesiredAccess, + IN AUDIT_EVENT_TYPE AuditType, + IN ULONG Flags, + IN POBJECT_TYPE_LIST ObjectTypeList, + IN ULONG ObjectTypeLength, + IN PGENERIC_MAPPING GenericMapping, + IN BOOLEAN ObjectCreation, + OUT PACCESS_MASK GrantedAccess, + OUT PNTSTATUS AccessStatus, + OUT PBOOLEAN GenerateOnClose +); + +NTSTATUS +NTAPI +NtAccessCheckByTypeResultListAndAuditAlarmByHandle( + IN PUNICODE_STRING SubsystemName, + IN HANDLE HandleId, + IN HANDLE ClientToken, + IN PUNICODE_STRING ObjectTypeName, + IN PUNICODE_STRING ObjectName, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSID PrincipalSelfSid, + IN ACCESS_MASK DesiredAccess, + IN AUDIT_EVENT_TYPE AuditType, + IN ULONG Flags, + IN POBJECT_TYPE_LIST ObjectTypeList, + IN ULONG ObjectTypeLength, + IN PGENERIC_MAPPING GenericMapping, + IN BOOLEAN ObjectCreation, + OUT PACCESS_MASK GrantedAccess, + OUT PNTSTATUS AccessStatus, + OUT PBOOLEAN GenerateOnClose +); + NTSYSAPI NTSTATUS NTAPI @@ -4644,6 +4708,17 @@ OUT PHANDLE NewTokenHandle ); +NTSTATUS +NTAPI +NtFilterToken( + IN HANDLE ExistingTokenHandle, + IN ULONG Flags, + IN PTOKEN_GROUPS SidsToDisable OPTIONAL, + IN PTOKEN_PRIVILEGES PrivilegesToDelete OPTIONAL, + IN PTOKEN_GROUPS RestrictedSids OPTIONAL, + OUT PHANDLE NewTokenHandle +); + NTSYSAPI NTSTATUS NTAPI Modified: trunk/reactos/include/ndk/sefuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/sefuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/sefuncs.h (original) +++ trunk/reactos/include/ndk/sefuncs.h Tue Oct 24 01:24:16 2006 @@ -103,7 +103,7 @@ NtAccessCheckByType( IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID PrincipalSelfSid, - IN PTOKEN ClientToken, + IN HANDLE ClientToken, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE_LIST ObjectTypeList, IN ULONG ObjectTypeLength, @@ -119,7 +119,7 @@ NtAccessCheckByTypeResultList( IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID PrincipalSelfSid, - IN PTOKEN ClientToken, + IN HANDLE ClientToken, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE_LIST ObjectTypeList, IN ULONG ObjectTypeLength, Modified: trunk/reactos/ntoskrnl/se/semgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/semgr.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/se/semgr.c (original) +++ trunk/reactos/ntoskrnl/se/semgr.c Tue Oct 24 01:24:16 2006 @@ -1150,7 +1150,7 @@ NTAPI NtAccessCheckByType(IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID PrincipalSelfSid, - IN PTOKEN ClientToken, + IN HANDLE ClientToken, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE_LIST ObjectTypeList, IN ULONG ObjectTypeLength, @@ -1163,7 +1163,6 @@ UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; } - NTSTATUS NTAPI @@ -1192,7 +1191,7 @@ NTAPI NtAccessCheckByTypeResultList(IN PSECURITY_DESCRIPTOR SecurityDescriptor, IN PSID PrincipalSelfSid, - IN PTOKEN ClientToken, + IN HANDLE ClientToken, IN ACCESS_MASK DesiredAccess, IN POBJECT_TYPE_LIST ObjectTypeList, IN ULONG ObjectTypeLength, @@ -1233,7 +1232,7 @@ NTAPI NtAccessCheckByTypeResultListAndAuditAlarmByHandle(IN PUNICODE_STRING SubsystemName, IN HANDLE HandleId, - IN PTOKEN ClientToken, + IN HANDLE ClientToken, IN PUNICODE_STRING ObjectTypeName, IN PUNICODE_STRING ObjectName, IN PSECURITY_DESCRIPTOR SecurityDescriptor,
18 years, 2 months
1
0
0
0
[ion] 24636: - Add NtApphelpCacheControl, NtFilterToken (WARNING: PATENTED. TAKE CARE WHEN IMPLEMENTING). - Add all the recently added functions to their proper place in the NDK.
by ion@svn.reactos.org
Author: ion Date: Tue Oct 24 01:19:15 2006 New Revision: 24636 URL:
http://svn.reactos.org/svn/reactos?rev=24636&view=rev
Log: - Add NtApphelpCacheControl, NtFilterToken (WARNING: PATENTED. TAKE CARE WHEN IMPLEMENTING). - Add all the recently added functions to their proper place in the NDK. Modified: trunk/reactos/include/ndk/cmfuncs.h trunk/reactos/include/ndk/exfuncs.h trunk/reactos/include/ndk/iofuncs.h trunk/reactos/include/ndk/kefuncs.h trunk/reactos/include/ndk/lpcfuncs.h trunk/reactos/include/ndk/mmfuncs.h trunk/reactos/include/ndk/obfuncs.h trunk/reactos/include/ndk/psfuncs.h trunk/reactos/include/ndk/sefuncs.h trunk/reactos/ntoskrnl/ps/psmgr.c trunk/reactos/ntoskrnl/se/token.c Modified: trunk/reactos/include/ndk/cmfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/cmfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/cmfuncs.h (original) +++ trunk/reactos/include/ndk/cmfuncs.h Tue Oct 24 01:19:15 2006 @@ -27,6 +27,20 @@ // // Native calls // +NTSTATUS +NTAPI +NtCompactKeys( + IN ULONG Count, + IN PHANDLE KeyArray +); + +NTSTATUS +NTAPI +NtCompressKey( + IN HANDLE Key, + IN ULONG Mode +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -120,6 +134,31 @@ IN ULONG Flags ); +NTSTATUS +NTAPI +NtLoadKeyEx( + IN POBJECT_ATTRIBUTES TargetKey, + IN POBJECT_ATTRIBUTES SourceFile, + IN ULONG Flags, + IN HANDLE TrustClassKey, + IN HANDLE Event, + IN ACCESS_MASK DesiredAccess, + OUT PHANDLE RootHandle +); + +NTSTATUS +NTAPI +NtLockProductActivationKeys( + IN PULONG pPrivateVer, + IN PULONG pSafeMode +); + +NTSTATUS +NTAPI +NtLockRegistryKey( + IN HANDLE KeyHandle +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -136,6 +175,23 @@ IN BOOLEAN WatchSubtree ); +NTSTATUS +NTAPI +NtNotifyChangeMultipleKeys( + IN HANDLE MasterKeyHandle, + IN ULONG Count, + IN POBJECT_ATTRIBUTES SlaveObjects, + IN HANDLE Event, + IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, + IN PVOID ApcContext OPTIONAL, + OUT PIO_STATUS_BLOCK IoStatusBlock, + IN ULONG CompletionFilter, + IN BOOLEAN WatchTree, + OUT PVOID Buffer, + IN ULONG Length, + IN BOOLEAN Asynchronous +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -177,6 +233,22 @@ OUT PULONG ReturnLength ); +NTSTATUS +NTAPI +NtQueryOpenSubKeys( + IN POBJECT_ATTRIBUTES TargetKey, + IN ULONG HandleCount +); + +NTSTATUS +NTAPI +NtQueryOpenSubKeysEx( + IN POBJECT_ATTRIBUTES TargetKey, + IN ULONG BufferLength, + IN PVOID Buffer, + IN PULONG RequiredSize +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -222,6 +294,15 @@ IN HANDLE KeyHandle, IN HANDLE FileHandle, IN ULONG Flags +); + + +NTSTATUS +NTAPI +NtSaveMergedKeys( + IN HANDLE HighPrecedenceKeyHandle, + IN HANDLE LowPrecedenceKeyHandle, + IN HANDLE FileHandle ); NTSYSCALLAPI @@ -251,6 +332,20 @@ NTAPI NtUnloadKey( IN POBJECT_ATTRIBUTES KeyObjectAttributes +); + +NTSTATUS +NTAPI +NtUnloadKey2( + IN POBJECT_ATTRIBUTES TargetKey, + IN ULONG Flags +); + +NTSTATUS +NTAPI +NtUnloadKeyEx( + IN POBJECT_ATTRIBUTES TargetKey, + IN HANDLE Event ); #ifdef NTOS_MODE_USER Modified: trunk/reactos/include/ndk/exfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/exfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/exfuncs.h (original) +++ trunk/reactos/include/ndk/exfuncs.h Tue Oct 24 01:19:15 2006 @@ -142,6 +142,15 @@ IN POBJECT_ATTRIBUTES ObjectAttributes ); +NTSTATUS +NTAPI +NtCreateKeyedEvent( + OUT PHANDLE KeyedEventHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes, + IN ULONG Flags +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -185,6 +194,15 @@ NTAPI NtDisplayString( IN PUNICODE_STRING DisplayString +); + + +NTSTATUS +NTAPI +NtEnumerateSystemEnvironmentValuesEx( + IN ULONG InformationClass, + IN PVOID Buffer, + IN ULONG BufferLength ); NTSYSCALLAPI @@ -332,6 +350,13 @@ OUT PWSTR Value, ULONG Length, PULONG ReturnLength +); + +NTSTATUS +NTAPI +NtQuerySystemEnvironmentValueEx( + IN PUNICODE_STRING VariableName, + IN LPGUID VendorGuid ); NTSYSCALLAPI @@ -473,6 +498,13 @@ NtSetSystemEnvironmentValue( IN PUNICODE_STRING VariableName, IN PUNICODE_STRING Value +); + +NTSTATUS +NTAPI +NtSetSystemEnvironmentValueEx( + IN PUNICODE_STRING VariableName, + IN LPGUID VendorGuid ); NTSYSCALLAPI Modified: trunk/reactos/include/ndk/iofuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/iofuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/iofuncs.h (original) +++ trunk/reactos/include/ndk/iofuncs.h Tue Oct 24 01:19:15 2006 @@ -32,6 +32,14 @@ NTSTATUS NTAPI NtAddBootEntry( + IN PBOOT_ENTRY BootEntry, + IN ULONG Id +); + +NTSYSCALLAPI +NTSTATUS +NTAPI +NtAddDriverEntry( IN PBOOT_ENTRY BootEntry, IN ULONG Id ); @@ -105,6 +113,14 @@ IN PLARGE_INTEGER DefaultTimeOut ); + +NTSYSCALLAPI +NTSTATUS +NTAPI +NtDeleteDriverEntry( + IN ULONG Id +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -146,6 +162,14 @@ NTSYSCALLAPI NTSTATUS NTAPI +NtEnumerateDriverEntries( + IN PVOID Buffer, + IN PULONG BufferLength +); + +NTSYSCALLAPI +NTSTATUS +NTAPI NtFlushBuffersFile( IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock @@ -198,6 +222,20 @@ NTSYSCALLAPI NTSTATUS NTAPI +NtModifyBootEntry( + IN PBOOT_ENTRY BootEntry +); + +NTSYSCALLAPI +NTSTATUS +NTAPI +NtModifyDriverEntry( + IN PEFI_DRIVER_ENTRY DriverEntry +); + +NTSYSCALLAPI +NTSTATUS +NTAPI NtNotifyChangeDirectoryFile( IN HANDLE FileHandle, IN HANDLE Event OPTIONAL, @@ -237,6 +275,13 @@ NtQueryAttributesFile( IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PFILE_BASIC_INFORMATION FileInformation +); + +NTSTATUS +NTAPI +NtQueryDriverEntryOrder( + IN PULONG Ids, + IN PULONG Count ); NTSYSCALLAPI @@ -398,6 +443,13 @@ NtSetBootOptions( IN PBOOT_OPTIONS BootOptions, IN ULONG FieldsToChange +); + +NTSTATUS +NTAPI +NtSetDriverEntryOrder( + IN PULONG Ids, + IN PULONG Count ); NTSYSCALLAPI Modified: trunk/reactos/include/ndk/kefuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/kefuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/kefuncs.h (original) +++ trunk/reactos/include/ndk/kefuncs.h Tue Oct 24 01:19:15 2006 @@ -357,6 +357,12 @@ IN ULONG NumberOfBytesToFlush ); +ULONG +NTAPI +NtGetCurrentProcessorNumber( + VOID +); + NTSYSCALLAPI NTSTATUS NTAPI Modified: trunk/reactos/include/ndk/lpcfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/lpcfuncs.h?rev…
============================================================================== --- trunk/reactos/include/ndk/lpcfuncs.h (original) +++ trunk/reactos/include/ndk/lpcfuncs.h Tue Oct 24 01:19:15 2006 @@ -107,6 +107,12 @@ PVOID PortInformation, ULONG PortInformationLength, PULONG ReturnLength +); + +NTSTATUS +NTAPI +NtQueryPortInformationProcess( + VOID ); NTSYSCALLAPI Modified: trunk/reactos/include/ndk/mmfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/mmfuncs.h (original) +++ trunk/reactos/include/ndk/mmfuncs.h Tue Oct 24 01:19:15 2006 @@ -64,6 +64,14 @@ IN PVOID File2MappedAsFile ); +NTSTATUS +NTAPI +NtAllocateUserPhysicalPages( + IN HANDLE ProcessHandle, + IN OUT PULONG NumberOfPages, + IN OUT PULONG UserPfnArray +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -117,6 +125,14 @@ OUT PULONG NumberOfBytesFlushed OPTIONAL ); +NTSTATUS +NTAPI +NtFreeUserPhysicalPages( + IN HANDLE ProcessHandle, + IN OUT PULONG NumberOfPages, + IN OUT PULONG UserPfnArray +); + NTSYSCALLAPI NTSTATUS NTAPI @@ -125,6 +141,19 @@ IN PVOID *BaseAddress, IN PSIZE_T RegionSize, IN ULONG FreeType +); + + +NTSTATUS +NTAPI +NtGetWriteWatch( + IN HANDLE ProcessHandle, + IN ULONG Flags, + IN PVOID BaseAddress, + IN ULONG RegionSize, + IN PVOID *UserAddressArray, + OUT PULONG EntriesInUserAddressArray, + OUT PULONG Granularity ); NTSYSCALLAPI @@ -135,6 +164,22 @@ PVOID BaseAddress, ULONG NumberOfBytesToLock, PULONG NumberOfBytesLocked +); + +NTSTATUS +NTAPI +NtMapUserPhysicalPages( + IN PVOID *VirtualAddresses, + IN ULONG NumberOfPages, + IN OUT PULONG UserPfnArray +); + +NTSTATUS +NTAPI +NtMapUserPhysicalPagesScatter( + IN PVOID *VirtualAddresses, + IN ULONG NumberOfPages, + IN OUT PULONG UserPfnArray ); NTSYSCALLAPI @@ -207,6 +252,14 @@ OUT PULONG NumberOfBytesRead ); +NTSTATUS +NTAPI +NtResetWriteWatch( + IN HANDLE ProcessHandle, + IN PVOID BaseAddress, + IN ULONG RegionSize +); + NTSYSCALLAPI NTSTATUS NTAPI Modified: trunk/reactos/include/ndk/obfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/obfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/obfuncs.h (original) +++ trunk/reactos/include/ndk/obfuncs.h Tue Oct 24 01:19:15 2006 @@ -294,6 +294,16 @@ IN PLARGE_INTEGER Time ); +NTSTATUS +NTAPI +NtWaitForMultipleObjects32( + IN ULONG ObjectCount, + IN PLONG Handles, + IN WAIT_TYPE WaitType, + IN BOOLEAN Alertable, + IN PLARGE_INTEGER TimeOut OPTIONAL +); + NTSYSCALLAPI NTSTATUS NTAPI Modified: trunk/reactos/include/ndk/psfuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/psfuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/psfuncs.h (original) +++ trunk/reactos/include/ndk/psfuncs.h Tue Oct 24 01:19:15 2006 @@ -145,6 +145,14 @@ PHANDLE JobHandle, ACCESS_MASK DesiredAccess, POBJECT_ATTRIBUTES ObjectAttributes +); + +NTSTATUS +NTAPI +NtCreateJobSet( + IN ULONG NumJob, + IN PJOB_SET_ARRAY UserJobSet, + IN ULONG Flags ); NTSYSCALLAPI @@ -159,6 +167,21 @@ IN HANDLE SectionHandle OPTIONAL, IN HANDLE DebugPort OPTIONAL, IN HANDLE ExceptionPort OPTIONAL +); + +NTSYSCALLAPI +NTSTATUS +NTAPI +NtCreateProcessEx( + OUT PHANDLE ProcessHandle, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, + IN HANDLE ParentProcess, + IN ULONG Flags, + IN HANDLE SectionHandle OPTIONAL, + IN HANDLE DebugPort OPTIONAL, + IN HANDLE ExceptionPort OPTIONAL, + IN BOOLEAN InJob ); NTSYSCALLAPI Modified: trunk/reactos/include/ndk/sefuncs.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/sefuncs.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/sefuncs.h (original) +++ trunk/reactos/include/ndk/sefuncs.h Tue Oct 24 01:19:15 2006 @@ -94,6 +94,38 @@ IN PGENERIC_MAPPING GenericMapping, OUT PPRIVILEGE_SET PrivilegeSet, OUT PULONG ReturnLength, + OUT PACCESS_MASK GrantedAccess, + OUT PNTSTATUS AccessStatus +); + +NTSTATUS +NTAPI +NtAccessCheckByType( + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSID PrincipalSelfSid, + IN PTOKEN ClientToken, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_TYPE_LIST ObjectTypeList, + IN ULONG ObjectTypeLength, + IN PGENERIC_MAPPING GenericMapping, + IN PPRIVILEGE_SET PrivilegeSet, + IN ULONG PrivilegeSetLength, + OUT PACCESS_MASK GrantedAccess, + OUT PNTSTATUS AccessStatus +); + +NTSTATUS +NTAPI +NtAccessCheckByTypeResultList( + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN PSID PrincipalSelfSid, + IN PTOKEN ClientToken, + IN ACCESS_MASK DesiredAccess, + IN POBJECT_TYPE_LIST ObjectTypeList, + IN ULONG ObjectTypeLength, + IN PGENERIC_MAPPING GenericMapping, + IN PPRIVILEGE_SET PrivilegeSet, + IN ULONG PrivilegeSetLength, OUT PACCESS_MASK GrantedAccess, OUT PNTSTATUS AccessStatus ); Modified: trunk/reactos/ntoskrnl/ps/psmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ps/psmgr.c (original) +++ trunk/reactos/ntoskrnl/ps/psmgr.c Tue Oct 24 01:19:15 2006 @@ -530,4 +530,14 @@ return (NtBuildNumber >> 28) == 0xC; } +typedef ULONG APPHELPCACHESERVICECLASS; +NTSTATUS +NTAPI +NtApphelpCacheControl(APPHELPCACHESERVICECLASS Service, + PVOID ServiceData) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + /* EOF */ Modified: trunk/reactos/ntoskrnl/se/token.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/se/token.c (original) +++ trunk/reactos/ntoskrnl/se/token.c Tue Oct 24 01:19:15 2006 @@ -2750,4 +2750,17 @@ return Status; } +NTSTATUS +NTAPI +NtFilterToken(IN HANDLE ExistingTokenHandle, + IN ULONG Flags, + IN PTOKEN_GROUPS SidsToDisable OPTIONAL, + IN PTOKEN_PRIVILEGES PrivilegesToDelete OPTIONAL, + IN PTOKEN_GROUPS RestrictedSids OPTIONAL, + OUT PHANDLE NewTokenHandle) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; +} + /* EOF */
18 years, 2 months
1
0
0
0
[ion] 24635: - Implement NtSetEventBoostPriority, NtGetCurrentProcessorNumber, NtQueryPortInformationProcess, NtWaitForMultipleObjects32.
by ion@svn.reactos.org
Author: ion Date: Tue Oct 24 00:49:52 2006 New Revision: 24635 URL:
http://svn.reactos.org/svn/reactos?rev=24635&view=rev
Log: - Implement NtSetEventBoostPriority, NtGetCurrentProcessorNumber, NtQueryPortInformationProcess, NtWaitForMultipleObjects32. Modified: trunk/reactos/ntoskrnl/ex/event.c trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/lpc/port.c trunk/reactos/ntoskrnl/ob/obwait.c Modified: trunk/reactos/ntoskrnl/ex/event.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/event.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ex/event.c (original) +++ trunk/reactos/ntoskrnl/ex/event.c Tue Oct 24 00:49:52 2006 @@ -463,7 +463,7 @@ EventHandle, PreviousState); /* Check if we were called from user-mode */ - if((PreviousState) && (PreviousMode != KernelMode)) + if ((PreviousState) && (PreviousMode != KernelMode)) { /* Entry SEH Block */ _SEH_TRY @@ -488,16 +488,14 @@ PreviousMode, (PVOID*)&Event, NULL); - - /* Check for success */ - if(NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { /* Set the Event */ LONG Prev = KeSetEvent(Event, EVENT_INCREMENT, FALSE); ObDereferenceObject(Event); /* Check if caller wants the old state back */ - if(PreviousState) + if (PreviousState) { /* Entry SEH Block for return */ _SEH_TRY @@ -511,10 +509,39 @@ } _SEH_END; } - } - - /* Return Status */ - return Status; + } + + /* Return Status */ + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +NtSetEventBoostPriority(IN HANDLE EventHandle) +{ + PKEVENT Event; + NTSTATUS Status; + PAGED_CODE(); + + /* Open the Object */ + Status = ObReferenceObjectByHandle(EventHandle, + EVENT_MODIFY_STATE, + ExEventObjectType, + ExGetPreviousMode(), + (PVOID*)&Event, + NULL); + if (NT_SUCCESS(Status)) + { + /* Set the Event */ + KeSetEventBoostPriority(Event, NULL); + ObDereferenceObject(Event); + } + + /* Return Status */ + return Status; } /* EOF */ Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c Tue Oct 24 00:49:52 2006 @@ -1692,5 +1692,12 @@ return STATUS_SUCCESS; } +ULONG +NTAPI +NtGetCurrentProcessorNumber(VOID) +{ + /* Just return the CPU */ + return KeGetCurrentProcessorNumber(); +} /* EOF */ Modified: trunk/reactos/ntoskrnl/lpc/port.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/lpc/port.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/lpc/port.c (original) +++ trunk/reactos/ntoskrnl/lpc/port.c Tue Oct 24 00:49:52 2006 @@ -133,4 +133,12 @@ return(STATUS_NOT_IMPLEMENTED); } +NTSTATUS +NTAPI +NtQueryPortInformationProcess(VOID) +{ + /* This is all this function does */ + return STATUS_UNSUCCESSFUL; +} + /* EOF */ Modified: trunk/reactos/ntoskrnl/ob/obwait.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obwait.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obwait.c (original) +++ trunk/reactos/ntoskrnl/ob/obwait.c Tue Oct 24 00:49:52 2006 @@ -278,6 +278,48 @@ } /*++ +* @name NtWaitForMultipleObjects32 +* @implemented NT5.1 +* +* The NtWaitForMultipleObjects32 routine <FILLMEIN> +* +* @param ObjectCount +* <FILLMEIN> +* +* @param HandleArray +* <FILLMEIN> +* +* @param WaitType +* <FILLMEIN> +* +* @param Alertable +* <FILLMEIN> +* +* @param TimeOut +* <FILLMEIN> +* +* @return STATUS_SUCCESS or appropriate error value. +* +* @remarks None. +* +*--*/ +NTSTATUS +NTAPI +NtWaitForMultipleObjects32(IN ULONG ObjectCount, + IN PLONG Handles, + IN WAIT_TYPE WaitType, + IN BOOLEAN Alertable, + IN PLARGE_INTEGER TimeOut OPTIONAL) +{ + /* FIXME WOW64 */ + return NtWaitForMultipleObjects(ObjectCount, + (PHANDLE)Handles, + WaitType, + Alertable, + TimeOut); +} + +/*++ * @name NtWaitForSingleObject * @implemented NT4 *
18 years, 2 months
1
0
0
0
[ion] 24634: - Should fix the build.
by ion@svn.reactos.org
Author: ion Date: Tue Oct 24 00:21:08 2006 New Revision: 24634 URL:
http://svn.reactos.org/svn/reactos?rev=24634&view=rev
Log: - Should fix the build. Modified: trunk/reactos/include/psdk/winbase.h Modified: trunk/reactos/include/psdk/winbase.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winbase.h?rev…
============================================================================== --- trunk/reactos/include/psdk/winbase.h (original) +++ trunk/reactos/include/psdk/winbase.h Tue Oct 24 00:21:08 2006 @@ -1054,11 +1054,6 @@ ComputerNameMax } COMPUTER_NAME_FORMAT; #endif /* (_WIN32_WINNT >= 0x0500) */ -typedef struct _JOB_SET_ARRAY { - HANDLE JobHandle; - DWORD MemberLevel; - DWORD Flags; -} JOB_SET_ARRAY, *PJOB_SET_ARRAY; #if (_WIN32_WINNT >= 0x0600) typedef RTL_SRWLOCK SRWLOCK, *PSRWLOCK; typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
18 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
...
36
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
Results per page:
10
25
50
100
200