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
September 2007
----- 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
19 participants
589 discussions
Start a n
N
ew thread
[gedmurphy] 28858: preset in case of failure
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 5 00:28:44 2007 New Revision: 28858 URL:
http://svn.reactos.org/svn/reactos?rev=28858&view=rev
Log: preset in case of failure Modified: trunk/reactos/dll/win32/setupapi/devinst.c Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c Wed Sep 5 00:28:44 2007 @@ -2787,7 +2787,9 @@ goto cleanup; } + ClassGUID = GUID_NULL; dwSize = MAX_GUID_STRING_LEN * sizeof(WCHAR); + if (RegQueryValueExW(hKey, REGSTR_VAL_CLASSGUID, NULL, @@ -2798,8 +2800,7 @@ szClassGuid[MAX_GUID_STRING_LEN - 2] = UNICODE_NULL; /* Convert a string to a ClassGuid */ - if (UuidFromStringW(&szClassGuid[1], &ClassGUID) != RPC_S_OK) - ClassGUID = GUID_NULL; + UuidFromStringW(&szClassGuid[1], &ClassGUID); } if (!CreateDeviceInfoElement(list, DeviceInstanceId, &ClassGUID, &deviceInfo))
17 years, 3 months
1
0
0
0
[janderwald] 28857: - finish immediately on unattended second stage install
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Sep 5 00:26:02 2007 New Revision: 28857 URL:
http://svn.reactos.org/svn/reactos?rev=28857&view=rev
Log: - finish immediately on unattended second stage install Modified: trunk/reactos/dll/win32/syssetup/wizard.c Modified: trunk/reactos/dll/win32/syssetup/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
============================================================================== --- trunk/reactos/dll/win32/syssetup/wizard.c (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c Wed Sep 5 00:26:02 2007 @@ -1926,6 +1926,12 @@ WM_SETFONT, (WPARAM)SetupData->hTitleFont, (LPARAM)TRUE); + if (SetupData->UnattendSetup) + { + KillTimer(hwndDlg, 1); + SetupIsActive(0); + PostQuitMessage(0); + } } break;
17 years, 3 months
1
0
0
0
[cwittich] 28856: fix some of the linux build issues
by cwittich@svn.reactos.org
Author: cwittich Date: Wed Sep 5 00:19:57 2007 New Revision: 28856 URL:
http://svn.reactos.org/svn/reactos?rev=28856&view=rev
Log: fix some of the linux build issues Modified: trunk/reactos/tools/sysreg/sysreg.mak trunk/reactos/tools/sysreg/user_types.h 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 Wed Sep 5 00:19:57 2007 @@ -18,19 +18,6 @@ SYSREGBUILD_TARGET = \ $(EXEPREFIX)$(SYSREGBUILD_OUT_)sysreg$(EXEPOSTFIX) -ifeq ($(HOST),mingw32-linux) -SYSREGBUILD_SOURCES = $(addprefix $(SYSREGBUILD_BASE_),\ - conf_parser.cpp \ - env_var.cpp \ - pipe_reader.cpp \ - rosboot_test.cpp \ - sysreg.cpp \ - file_reader.cpp \ - os_support.cpp \ - unicode.cpp \ - ) - -else SYSREGBUILD_SOURCES = $(addprefix $(SYSREGBUILD_BASE_),\ conf_parser.cpp \ env_var.cpp \ @@ -41,7 +28,6 @@ os_support.cpp \ unicode.cpp \ ) -endif SYSREGBUILD_OBJECTS = \ $(addprefix $(INTERMEDIATE_), $(SYSREGBUILD_SOURCES:.cpp=.o)) @@ -75,11 +61,9 @@ $(ECHO_CC) ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@ -ifneq ($(HOST),mingw32-linux) $(SYSREGBUILD_INT_)namedpipe_reader.o: $(SYSREGBUILD_BASE_)namedpipe_reader.cpp | $(SYSREGBUILD_INT) $(ECHO_CC) ${host_gpp} $(SYSREGBUILD_HOST_CFLAGS) -c $< -o $@ -endif $(SYSREGBUILD_INT_)rosboot_test.o: $(SYSREGBUILD_BASE_)rosboot_test.cpp | $(SYSREGBUILD_INT) $(ECHO_CC) 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 Wed Sep 5 00:19:57 2007 @@ -18,6 +18,7 @@ #else #define TCHAR char #define tstrcpy strcpy + #define _tcschr strchr #define _tcscat strcat #define _tcscpy(str1, str2) strcpy(str1, str2) #define _tcslen(str1) strlen(str1)
17 years, 3 months
1
0
0
0
[gedmurphy] 28855: - read ClassGUID from the registry instead of sending GUID_NULL - fixes part of SetupDiOpenDeviceInfo which now allows loading of icons in the devmgr.dll property sheets
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Sep 5 00:18:39 2007 New Revision: 28855 URL:
http://svn.reactos.org/svn/reactos?rev=28855&view=rev
Log: - read ClassGUID from the registry instead of sending GUID_NULL - fixes part of SetupDiOpenDeviceInfo which now allows loading of icons in the devmgr.dll property sheets Modified: trunk/reactos/dll/win32/setupapi/devinst.c Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst…
============================================================================== --- trunk/reactos/dll/win32/setupapi/devinst.c (original) +++ trunk/reactos/dll/win32/setupapi/devinst.c Wed Sep 5 00:18:39 2007 @@ -2710,7 +2710,7 @@ { struct DeviceInfoSet *list; HKEY hEnumKey, hKey = NULL; - DWORD rc; + DWORD rc, dwSize; BOOL ret = FALSE; TRACE("%p %s %p %lx %p\n", @@ -2738,7 +2738,7 @@ struct DeviceInfoElement *deviceInfo = NULL; /* Search if device already exists in DeviceInfoSet. * If yes, return the existing element - * If no, create a new element using informations in registry + * If no, create a new element using information in registry */ PLIST_ENTRY ItemList = list->ListHead.Flink; while (ItemList != &list->ListHead) @@ -2757,6 +2757,9 @@ } else { + GUID ClassGUID; + WCHAR szClassGuid[MAX_GUID_STRING_LEN]; + /* Open supposed registry key */ rc = RegOpenKeyExW( list->HKLM, @@ -2784,11 +2787,24 @@ goto cleanup; } - /* FIXME: try to get ClassGUID from registry, instead of - * sending GUID_NULL to CreateDeviceInfoElement - */ - if (!CreateDeviceInfoElement(list, DeviceInstanceId, &GUID_NULL, &deviceInfo)) + dwSize = MAX_GUID_STRING_LEN * sizeof(WCHAR); + if (RegQueryValueExW(hKey, + REGSTR_VAL_CLASSGUID, + NULL, + NULL, + (LPBYTE)szClassGuid, + &dwSize) == ERROR_SUCCESS) + { + szClassGuid[MAX_GUID_STRING_LEN - 2] = UNICODE_NULL; + + /* Convert a string to a ClassGuid */ + if (UuidFromStringW(&szClassGuid[1], &ClassGUID) != RPC_S_OK) + ClassGUID = GUID_NULL; + } + + if (!CreateDeviceInfoElement(list, DeviceInstanceId, &ClassGUID, &deviceInfo)) goto cleanup; + InsertTailList(&list->ListHead, &deviceInfo->ListEntry); ret = TRUE;
17 years, 3 months
1
0
0
0
[janderwald] 28854: - readd named pipe support for linux by Christoph_vW - simplify named pipe code - only allocate buffer for reading once - dont format default hdd if it exists - delay read at right position - fix ROS_DELAY_READ option in config file - value is expected to be in seconds not milliseconds
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Sep 4 23:53:49 2007 New Revision: 28854 URL:
http://svn.reactos.org/svn/reactos?rev=28854&view=rev
Log: - readd named pipe support for linux by Christoph_vW - simplify named pipe code - only allocate buffer for reading once - dont format default hdd if it exists - delay read at right position - fix ROS_DELAY_READ option in config file - value is expected to be in seconds not milliseconds Modified: trunk/reactos/tools/sysreg/namedpipe_reader.cpp trunk/reactos/tools/sysreg/namedpipe_reader.h trunk/reactos/tools/sysreg/rosboot_test.cpp trunk/reactos/tools/sysreg/rosboot_test.h trunk/reactos/tools/sysreg/txtmode.cfg Modified: trunk/reactos/tools/sysreg/namedpipe_reader.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/namedpipe_rea…
============================================================================== --- trunk/reactos/tools/sysreg/namedpipe_reader.cpp (original) +++ trunk/reactos/tools/sysreg/namedpipe_reader.cpp Tue Sep 4 23:53:49 2007 @@ -20,15 +20,22 @@ using std::vector; //--------------------------------------------------------------------------------------- - NamedPipeReader::NamedPipeReader() : DataSource(), h_Pipe(NULLVAL) - { - + NamedPipeReader::NamedPipeReader() : DataSource(), h_Pipe(NULLVAL), m_Buffer(0) + { +#ifdef UNICODE + m_WBuffer = 0; +#endif } //--------------------------------------------------------------------------------------- NamedPipeReader::~NamedPipeReader() { - + if (m_Buffer) + free(m_Buffer); +#ifdef UNICODE + if (m_WBuffer) + free(m_WBuffer); +#endif } bool NamedPipeReader::isSourceOpen() @@ -45,15 +52,15 @@ cerr << "NamedPipeReader::openPipe> pipe already open" << endl; return false; } - +#ifndef __LINUX__ h_Pipe = CreateFile("\\\\.\\pipe\\qemu", //PipeCmd.c_str(), - GENERIC_WRITE | GENERIC_READ, - 0, - NULL, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - (HANDLE) - NULL); + GENERIC_WRITE | GENERIC_READ, + 0, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + (HANDLE) + NULL); if(INVALID_HANDLE_VALUE == h_Pipe) { cerr << "NamedPipeReader::openPipe> failed to open pipe " << PipeCmd << " Error:" << GetLastError() << endl; @@ -63,26 +70,46 @@ else { cout << "NamedPipeReader::openPipe> successfully opened pipe" << endl; + m_BufferLength = 100; + m_Buffer = (char*)malloc(sizeof(char) * m_BufferLength); +#ifdef UNICODE + m_WBuffer = (WCHAR*)malloc(sizeof(WCHAR) * m_BufferLength); +#endif + ConnectNamedPipe(h_Pipe, + 0); + return true; + } +#else + h_Pipe = open("PipeCmd.c_str()", O_RDONLY); + + if(INVALID_HANDLE_VALUE == h_Pipe) { + cerr << "NamedPipeReader::openPipe> failed to open pipe " << PipeCmd << endl; + h_Pipe = NULLVAL; + return false; + } + else + { + cout << "NamedPipeReader::openPipe> successfully opened pipe" << endl; return true; } - - ConnectNamedPipe( - h_Pipe, - 0); +#endif } //--------------------------------------------------------------------------------------- bool NamedPipeReader::closeSource() { - if (h_Pipe == INVALID_HANDLE_VALUE) + if (h_Pipe == NULLVAL) { cerr << "NamedPipeReader::closePipe> pipe is not open" << endl; return false; } +#ifdef __LINUX__ + close(h_Pipe); +#else DisconnectNamedPipe(h_Pipe); CloseHandle(h_Pipe); - +#endif h_Pipe = NULLVAL; return true; } @@ -173,70 +200,75 @@ append_line = false; } } - +//--------------------------------------------------------------------------------------- + bool NamedPipeReader::readPipe(char * buffer, int bufferlength, long & read) + { + +#ifdef __LINUX__ + long cbRead = read(h_Pipe, + buffer, + (bufferlength-1) * sizeof(char)); +#else + DWORD cbRead = 0; + BOOL fSuccess = ReadFile(h_Pipe, + buffer, + (bufferlength-1) * sizeof(char), + &cbRead, + NULL); + + if (!fSuccess && GetLastError() != ERROR_MORE_DATA) + return false; +#endif + + read = cbRead; + return true; + } //--------------------------------------------------------------------------------------- bool NamedPipeReader::readSource(vector<string> & vect) { - char * localbuf; - DWORD localsize = 100; size_t lines = vect.size (); - BOOL fSuccess; - localbuf = (char*) HeapAlloc(GetProcessHeap(), 0, localsize * sizeof(char)); -#ifdef UNICODE - wchar_t * wbuf = (WCHAR*) HeapAlloc(GetProcessHeap(), 0, localsize * sizeof(wchar_t)); -#endif /* UNICODE */ - if (localbuf != NULL) - { - bool append_line = false; - do - { - DWORD cbRead; - do - { - ZeroMemory(localbuf, localsize * sizeof(char)); -#ifdef UNICODE - ZeroMemory(wbuf, localsize * sizeof(wchar_t)); -#endif /* UNICODE */ - - fSuccess = ReadFile( - h_Pipe, - localbuf, - (localsize-1) * sizeof(char), - &cbRead, - NULL); - - if (! fSuccess && GetLastError() != ERROR_MORE_DATA) - break; - -#ifdef UNICODE - if (UnicodeConverter::ansi2Unicode(localbuf, wbuf, cbRead)) - { - extractLines(wbuf, vect, append_line, cbRead); - } -#else /* UNICODE */ - extractLines(localbuf, vect, append_line, cbRead); -#endif /* UNICODE */ - - } while (!fSuccess); // repeat loop if ERROR_MORE_DATA - } while (append_line); - - if (!fSuccess) - return 0; - - HeapFree(GetProcessHeap(), 0, localbuf); -#ifdef UNICODE - HeapFree(GetProcessHeap(), 0, wbuf); -#endif /* UNICODE */ - } - else - { - return 0; - } - - return (vect.size () - lines); - } + if (h_Pipe == NULLVAL) + { + cerr << "Error: pipe is not open" << endl; + return false; + } + + if (!m_Buffer) + { + cerr << "Error: no memory" << endl; + } + +#ifdef UNICODE + if (!m_WBuffer) + { + cerr << "Error: no memory" << endl; + } +#endif + + bool append_line = false; + do + { + memset(m_Buffer, 0x0, m_BufferLength * sizeof(char)); + long cbRead = 0; + + if (!readPipe(m_Buffer, 100, cbRead)) + break; + +#ifdef UNICODE + memset(m_WBuffer, 0x0, m_BufferLength * sizeof(WCHAR)); + if (!UnicodeConverter::ansi2Unicode(m_Buffer, m_WBuffer, cbRead)) + break; + extractLines(m_WBuffer, vect, append_line, cbRead); +#endif + extractLines(m_Buffer, vect, append_line, cbRead); + + + }while (append_line); + + return (vect.size () - lines); +} } // end of namespace System_ Modified: trunk/reactos/tools/sysreg/namedpipe_reader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/namedpipe_rea…
============================================================================== --- trunk/reactos/tools/sysreg/namedpipe_reader.h (original) +++ trunk/reactos/tools/sysreg/namedpipe_reader.h Tue Sep 4 23:53:49 2007 @@ -120,8 +120,15 @@ void extractLines(TCHAR * buffer, std::vector<string> & vect, bool & append_line, unsigned long cbRead); + bool readPipe(char * buffer, int bufferlength, long & read); + HANDLE h_Pipe; + char * m_Buffer; + int m_BufferLength; +#ifdef UNICODE + WCHAR * m_WBuffer; +#endif }; // end of class NamedPipeReader 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 Sep 4 23:53:49 2007 @@ -247,12 +247,14 @@ } #ifdef __LINUX__ - pipe = _T("stdio"); - m_Src = _T(""); + pipe = _T("pipe:/tmp/qemu"); + m_Src = _T("/tmp/qemu"); qemudir = _T("/usr/share/qemu"); + m_DebugPort = _T("pipe"); #else pipe = _T("pipe:qemu"); m_Src = _T("\\\\.\\pipe\\qemu"); + m_DebugPort = _T("pipe"); if (!getQemuDir(qemudir)) { return false; @@ -322,29 +324,26 @@ pos = pipe.find(_T("pipe:")); if (pos == 0) { -#ifdef __LINUX__ - cerr << "Error: reading from pipes is not supported with linux hosts - use stdio" << endl; - return false; - } -#else pipe = pipe.substr(pos + 5, pipe.size() - pos - 5); pos = pipe.find(_T(" ")); if (pos != string::npos) { - m_Src = _T("\\\\.\\pipe\\") + pipe.substr(0, pos); - } - else - { - m_Src = _T("\\\\.\\pipe\\") + pipe; - } + pipe = pipe.substr(0, pos); + } +#ifdef __LINUX__ + m_Src = pipe; +#else + m_Src = _T("\\\\.\\pipe\\") + pipe.substr(0, pos); +#endif + m_DebugPort = _T("pipe"); return true; } -#endif pos = pipe.find(_T("stdio")); if (pos == 0) { #ifdef __LINUX__ m_Src = m_BootCmd; + m_DebugPort = _T("stdio"); return true; #else cerr << "Error: reading from stdio is not supported for windows hosts - use pipes" << endl; @@ -387,6 +386,11 @@ } getDefaultHDDImage(m_HDDImage); + if (isFileExisting(m_HDDImage)) + { + cerr << "Falling back to default hdd image " << m_HDDImage << endl; + return true; + } return createHDDImage(m_HDDImage); } /* @@ -552,19 +556,20 @@ } cerr << "Opening Data Source:" << m_BootCmd << endl; - +/* #ifdef __LINUX__ _tremove(m_PidFile.c_str ()); m_DataSource = new PipeReader(); m_Src = m_BootCmd; #else +*/ m_DataSource = new NamedPipeReader(); if (!executeBootCmd()) { cerr << "Error: failed to launch emulator with: " << m_BootCmd << endl; return false; } -#endif +//#endif return true; } @@ -659,23 +664,19 @@ return false; } #endif -#ifndef __LINUX__ - OsSupport::delayExecution(1); -#endif - - assert(m_DataSource != 0); + + if (m_DelayRead) + { + cerr << "Delaying read for " << m_DelayRead << " seconds" << endl; + OsSupport::delayExecution(m_DelayRead); + } + if (!m_DataSource->openSource(m_Src)) { cerr << "Error: failed to open data source with " << m_Src << endl; cleanup(); return false; } - - if (m_DelayRead) - { - OsSupport::delayExecution(m_DelayRead); - } - #ifdef __LINUX__ /* * For linux systems we can only 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 Sep 4 23:53:49 2007 @@ -157,6 +157,7 @@ string m_MaxMem; string m_BootCmd; string m_Src; + string m_DebugPort; string m_PidFile; DataSource * m_DataSource; Modified: trunk/reactos/tools/sysreg/txtmode.cfg URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/sysreg/txtmode.cfg?r…
============================================================================== --- trunk/reactos/tools/sysreg/txtmode.cfg (original) +++ trunk/reactos/tools/sysreg/txtmode.cfg Tue Sep 4 23:53:49 2007 @@ -60,7 +60,7 @@ ; ; Note: set this value if you have problems with timeouts or cutoff debugging data ; -ROS_DELAY_READ=4000 +ROS_DELAY_READ=4 ; ROS_CHECK_POINT ;
17 years, 3 months
1
0
0
0
[janderwald] 28853: - fix a bug
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Sep 4 23:41:58 2007 New Revision: 28853 URL:
http://svn.reactos.org/svn/reactos?rev=28853&view=rev
Log: - fix a bug Modified: trunk/reactos/dll/win32/syssetup/wizard.c Modified: trunk/reactos/dll/win32/syssetup/wizard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/syssetup/wizard.…
============================================================================== --- trunk/reactos/dll/win32/syssetup/wizard.c (original) +++ trunk/reactos/dll/win32/syssetup/wizard.c Tue Sep 4 23:41:58 2007 @@ -2197,9 +2197,9 @@ szPath[length] = '\\'; length++; } - strcpy(&szPath[length], "system32\\dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); + strcpy(&szPath[length], "dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE\n"); fwrite(szPath, 1, strlen(szPath) + 1, file); - strcpy(&szPath[length], "system32\\shutdown.exe -s"); + strcpy(&szPath[length], "shutdown.exe -s"); fwrite(szPath, 1, strlen(szPath) + 1, file); } fclose(file);
17 years, 3 months
1
0
0
0
[fireball] 28852: - Use real NT KPCR address (0xFFDFF000). - Remove all hacked KPCR_BASE definitions. - Make FreeLDR give address of PageDirectoryStart/End addresses. This was being ignored/incorrect until now and the page directory could've gotten overwritten. - Properly setup the HAL PDE, instead of having different PDEs for KUSER_SHARED_DATA, KPCR and ACPI I/O. - Do not over-write shared user data with ACPI I/O anymore. This was probably a bad idea. - Do not mark almost a meg of space as KPCR
by fireball@svn.reactos.org
Author: fireball Date: Tue Sep 4 22:19:59 2007 New Revision: 28852 URL:
http://svn.reactos.org/svn/reactos?rev=28852&view=rev
Log: - Use real NT KPCR address (0xFFDFF000). - Remove all hacked KPCR_BASE definitions. - Make FreeLDR give address of PageDirectoryStart/End addresses. This was being ignored/incorrect until now and the page directory could've gotten overwritten. - Properly setup the HAL PDE, instead of having different PDEs for KUSER_SHARED_DATA, KPCR and ACPI I/O. - Do not over-write shared user data with ACPI I/O anymore. This was probably a bad idea. - Do not mark almost a meg of space as KPCR_USERD_SHARED data anymore, and don't mess up the CPU TLB anymore. - Give a dedicated page to KUSER_SHARED_DATA (Page 2, physical address 0x2000) right after the KPCR, isntead of a random address that probably ended up overwritten later during the OS's lifetime. - Fix FS selector in the GDT. - Remove hack in Trap Fault Handler. - Add a little hack to allow mapping Page 2 into user-space even though it's marked as used, this is for the Shared User Data page. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c trunk/reactos/boot/freeldr/freeldr/include/reactos.h trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/hal/halx86/include/halp.h trunk/reactos/include/ddk/winddk.h trunk/reactos/include/ndk/asm.h trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/io/iomgr/iomgr.c trunk/reactos/ntoskrnl/ke/freeldr.c trunk/reactos/ntoskrnl/ke/i386/cpu.c trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/i386/page.c trunk/reactos/ntoskrnl/mm/mm.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/ob/obinit.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/loader.c Tue Sep 4 22:19:59 2007 @@ -175,20 +175,10 @@ PageDir->Pde[HyperspacePageTableIndex].Write = 1; PageDir->Pde[HyperspacePageTableIndex].PageFrameNumber = PaPtrToPfn(hyperspace_pagetable); - /* Set up the Apic PDE */ - PageDir->Pde[ApicPageTableIndex].Valid = 1; - PageDir->Pde[ApicPageTableIndex].Write = 1; - PageDir->Pde[ApicPageTableIndex].PageFrameNumber = PaPtrToPfn(apic_pagetable); - - /* Set up the KPCR PDE */ - PageDir->Pde[KpcrPageTableIndex].Valid = 1; - PageDir->Pde[KpcrPageTableIndex].Write = 1; - PageDir->Pde[KpcrPageTableIndex].PageFrameNumber = PaPtrToPfn(kpcr_pagetable); - - /* Set up the KUSER PDE */ - PageDir->Pde[KuserPageTableIndex].Valid = 1; - PageDir->Pde[KuserPageTableIndex].Write = 1; - PageDir->Pde[KuserPageTableIndex].PageFrameNumber = PaPtrToPfn(kuser_pagetable); + /* Set up the HAL PDE */ + PageDir->Pde[HalPageTableIndex].Valid = 1; + PageDir->Pde[HalPageTableIndex].Write = 1; + PageDir->Pde[HalPageTableIndex].PageFrameNumber = PaPtrToPfn(apic_pagetable); /* Set up Low Memory PTEs */ PageDir = (PPAGE_DIRECTORY_X86)&lowmem_pagetable; @@ -209,35 +199,28 @@ PageDir->Pde[i].PageFrameNumber = PaToPfn(KERNEL_BASE_PHYS + i * PAGE_SIZE); } - /* Set up APIC PTEs */ + /* Setup APIC Base */ PageDir = (PPAGE_DIRECTORY_X86)&apic_pagetable; PageDir->Pde[0].Valid = 1; PageDir->Pde[0].Write = 1; PageDir->Pde[0].CacheDisable = 1; PageDir->Pde[0].WriteThrough = 1; - PageDir->Pde[0].PageFrameNumber = PaToPfn(APIC_BASE); + PageDir->Pde[0].PageFrameNumber = PaToPfn(HAL_BASE); PageDir->Pde[0x200].Valid = 1; PageDir->Pde[0x200].Write = 1; PageDir->Pde[0x200].CacheDisable = 1; PageDir->Pde[0x200].WriteThrough = 1; - PageDir->Pde[0x200].PageFrameNumber = PaToPfn(APIC_BASE + KERNEL_BASE_PHYS); - - /* Set up KPCR PTEs */ - PageDir = (PPAGE_DIRECTORY_X86)&kpcr_pagetable; - PageDir->Pde[0].Valid = 1; - PageDir->Pde[0].Write = 1; - PageDir->Pde[0].PageFrameNumber = 1; - - /* Setup KUSER PTEs */ - PageDir = (PPAGE_DIRECTORY_X86)&kuser_pagetable; - for (i = 0; i < 1024; i++) - { - /* SEetup each entry */ - PageDir->Pde[i].Valid = 1; - PageDir->Pde[i].Write = 1; - PageDir->Pde[i].Owner = 1; - PageDir->Pde[i].PageFrameNumber = PaToPfn(KI_USER_SHARED_DATA + i * PAGE_SIZE); - } + PageDir->Pde[0x200].PageFrameNumber = PaToPfn(HAL_BASE + KERNEL_BASE_PHYS); + + /* Setup KUSER_SHARED_DATA Base */ + PageDir->Pde[0x1F0].Valid = 1; + PageDir->Pde[0x1F0].Write = 1; + PageDir->Pde[0x1F0].PageFrameNumber = 2; + + /* Setup KPCR Base*/ + PageDir->Pde[0x1FF].Valid = 1; + PageDir->Pde[0x1FF].Write = 1; + PageDir->Pde[0x1FF].PageFrameNumber = 1; } PLOADER_MODULE Modified: trunk/reactos/boot/freeldr/freeldr/include/reactos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/reactos.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/reactos.h Tue Sep 4 22:19:59 2007 @@ -40,16 +40,12 @@ #define STARTUP_BASE 0xC0000000 #define HYPERSPACE_BASE 0xC0400000 -#define HYPERSPACE_PAE_BASE 0xC0800000 -#define APIC_BASE 0xFEC00000 -#define KPCR_BASE 0xFF000000 +#define HAL_BASE 0xFFC00000 #define LowMemPageTableIndex 0 #define StartupPageTableIndex (STARTUP_BASE >> 22) #define HyperspacePageTableIndex (HYPERSPACE_BASE >> 22) -#define KpcrPageTableIndex (KPCR_BASE >> 22) -#define ApicPageTableIndex (APIC_BASE >> 22) -#define KuserPageTableIndex (KI_USER_SHARED_DATA >> 22) +#define HalPageTableIndex (HAL_BASE >> 22) typedef struct _PAGE_DIRECTORY_X86 { Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Tue Sep 4 22:19:59 2007 @@ -22,6 +22,9 @@ #include <freeldr.h> #include <debug.h> +extern ULONG PageDirectoryStart; +extern ULONG PageDirectoryEnd; + ROS_LOADER_PARAMETER_BLOCK LoaderBlock; char reactos_kernel_cmdline[255]; // Command line passed to kernel LOADER_MODULE reactos_modules[64]; // Array to hold boot module info loaded for the kernel @@ -592,6 +595,8 @@ * Setup multiboot information structure */ LoaderBlock.CommandLine = reactos_kernel_cmdline; + LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart; + LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd; LoaderBlock.ModsCount = 0; LoaderBlock.ModsAddr = reactos_modules; LoaderBlock.DrivesAddr = reactos_arc_disk_info; Modified: trunk/reactos/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/halp.h?…
============================================================================== --- trunk/reactos/hal/halx86/include/halp.h (original) +++ trunk/reactos/hal/halx86/include/halp.h Tue Sep 4 22:19:59 2007 @@ -4,9 +4,6 @@ #ifndef __INTERNAL_HAL_HAL_H #define __INTERNAL_HAL_HAL_H - -/* Temporary hack */ -#define KPCR_BASE 0xFF000000 #define HAL_APC_REQUEST 0 #define HAL_DPC_REQUEST 1 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 Sep 4 22:19:59 2007 @@ -227,11 +227,7 @@ #define ZwCurrentProcess() NtCurrentProcess() #define NtCurrentThread() ( (HANDLE)(LONG_PTR) -2 ) #define ZwCurrentThread() NtCurrentThread() -#ifdef _REACTOS_ -#define KIP0PCRADDRESS 0xff000000 -#else #define KIP0PCRADDRESS 0xffdff000 -#endif #define KERNEL_STACK_SIZE 12288 #define KERNEL_LARGE_STACK_SIZE 61440 Modified: trunk/reactos/include/ndk/asm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/asm.h?rev=2885…
============================================================================== --- trunk/reactos/include/ndk/asm.h (original) +++ trunk/reactos/include/ndk/asm.h Tue Sep 4 22:19:59 2007 @@ -29,7 +29,7 @@ #ifdef CONFIG_SMP #define PCR fs: #else -#define PCR ds:[0xFF000000] +#define PCR ds:[0xFFDFF000] #endif #endif @@ -613,3 +613,4 @@ + 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 Sep 4 22:19:59 2007 @@ -904,7 +904,7 @@ } CurrentTime.QuadPart = KeQueryInterruptTime(); - Prcb = ((PKPCR)KPCR_BASE)->Prcb; + Prcb = KeGetPcr()->Prcb; for (i = 0; i < KeNumberProcessors; i++) { Spi->IdleTime.QuadPart = (Prcb->IdleThread->KernelTime + Prcb->IdleThread->UserTime) * 100000LL; // IdleTime @@ -1196,7 +1196,7 @@ ti = KeQueryTimeIncrement(); - Prcb = ((PKPCR)KPCR_BASE)->Prcb; + Prcb = KeGetPcr()->Prcb; for (i = 0; i < KeNumberProcessors; i++) { //sii->ContextSwitches = Prcb->KeContextSwitches; Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h Tue Sep 4 22:19:59 2007 @@ -60,7 +60,6 @@ #define NR_SECTION_PAGE_ENTRIES 1024 #define TEB_BASE 0x7FFDE000 -#define KPCR_BASE 0xFF000000 /* Although Microsoft says this isn't hardcoded anymore, they won't be able to change it. Stuff depends on it */ Modified: trunk/reactos/ntoskrnl/io/iomgr/iomgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iomgr.c?…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iomgr.c (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iomgr.c Tue Sep 4 22:19:59 2007 @@ -149,7 +149,7 @@ for (i = 0; i < KeNumberProcessors; i++) { /* Get the PRCB for this CPU */ - Prcb = ((PKPCR)(KPCR_BASE + i * PAGE_SIZE))->Prcb; + Prcb = ((PKPCR)(KIP0PCRADDRESS + i * PAGE_SIZE))->Prcb; DPRINT("Setting up lookaside for CPU: %x, PRCB: %p\n", i, Prcb); /* Set the Large IRP List */ Modified: trunk/reactos/ntoskrnl/ke/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ke/freeldr.c (original) +++ trunk/reactos/ntoskrnl/ke/freeldr.c Tue Sep 4 22:19:59 2007 @@ -471,8 +471,8 @@ Status = KiRosAllocateArcDescriptor(0, 1, MemoryFirmwarePermanent); if (Status != STATUS_SUCCESS) return Status; - /* Build an entry for the KPCR (which we put in page 1) */ - Status = KiRosAllocateArcDescriptor(1, 2, LoaderMemoryData); + /* Build an entry for the KPCR and KUSER_SHARED_DATA */ + Status = KiRosAllocateArcDescriptor(1, 3, LoaderMemoryData); if (Status != STATUS_SUCCESS) return Status; /* Build an entry for the PDE and return the status */ @@ -882,8 +882,8 @@ /* First get some kernel-loader globals */ AcpiTableDetected = (RosLoaderBlock->Flags & MB_FLAGS_ACPI_TABLE) ? TRUE : FALSE; - MmFreeLdrMemHigher = RosLoaderBlock->MemHigher; - MmFreeLdrPageDirectoryEnd = RosLoaderBlock->PageDirectoryEnd; + MmFreeLdrMemHigher = RosLoaderBlock->MemHigher; + MmFreeLdrPageDirectoryEnd = RosLoaderBlock->PageDirectoryEnd; if (!MmFreeLdrPageDirectoryEnd) MmFreeLdrPageDirectoryEnd = 0x40000; /* Set the NT Loader block and initialize it */ Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/cpu.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/cpu.c Tue Sep 4 22:19:59 2007 @@ -38,7 +38,7 @@ {0xffff, 0x0000, {{0x00, 0xfb, 0xcf, 0x00}}}, /* KGDT_R3_CODE */ {0xffff, 0x0000, {{0x00, 0xf3, 0xcf, 0x00}}}, /* KGDT_R3_DATA*/ {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_TSS */ - {0x0fff, 0x0000, {{0x00, 0x93, 0xc0, 0xff}}}, /* KGDT_R0_PCR */ + {0x0001, 0xf000, {{0xdf, 0x93, 0xc0, 0xff}}}, /* KGDT_R0_PCR */ {0x0fff, 0x0000, {{0x00, 0xf3, 0x40, 0x00}}}, /* KGDT_R3_TEB */ {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_UNUSED */ {0x0000, 0x0000, {{0x00, 0x00, 0x00, 0x00}}}, /* KGDT_LDT */ Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c Tue Sep 4 22:19:59 2007 @@ -428,7 +428,7 @@ if (j == 0) { /* - * Page zero is reserved + * Page zero is reserved for the IVT */ MmPageArray[0].Flags.Type = MM_PHYSICAL_PAGE_BIOS; MmPageArray[0].Flags.Consumer = MC_NPPOOL; @@ -443,6 +443,19 @@ /* * Page one is reserved for the initial KPCR + */ + MmPageArray[1].Flags.Type = MM_PHYSICAL_PAGE_BIOS; + MmPageArray[1].Flags.Consumer = MC_NPPOOL; + MmPageArray[1].Flags.Zero = 0; + MmPageArray[1].ReferenceCount = 0; + InsertTailList(&BiosPageListHead, + &MmPageArray[1].ListEntry); + MmStats.NrReservedPages++; + } + else if (j == 2) + { + /* + * Page two is reserved for the KUSER_SHARED_DATA */ MmPageArray[1].Flags.Type = MM_PHYSICAL_PAGE_BIOS; MmPageArray[1].Flags.Consumer = MC_NPPOOL; Modified: trunk/reactos/ntoskrnl/mm/i386/page.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/i386/page.c (original) +++ trunk/reactos/ntoskrnl/mm/i386/page.c Tue Sep 4 22:19:59 2007 @@ -1925,8 +1925,16 @@ { if (!MmIsUsablePage(Pages[i])) { - DPRINT1("Page at address %x not usable\n", PFN_TO_PTE(Pages[i])); - KEBUGCHECK(0); + /* Is this an attempt to map KUSER_SHARED_DATA? */ + if ((Address == (PVOID)0x7FFE0000) && (PageCount == 1) && (Pages[0] == 2)) + { + // allow + } + else + { + DPRINT1("Page at address %x not usable\n", PFN_TO_PTE(Pages[i])); + KEBUGCHECK(0); + } } } Modified: trunk/reactos/ntoskrnl/mm/mm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mm.c?rev=28852…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mm.c (original) +++ trunk/reactos/ntoskrnl/mm/mm.c Tue Sep 4 22:19:59 2007 @@ -192,17 +192,6 @@ { CPRINT("Page fault at high IRQL was %d, address %x\n", KeGetCurrentIrql(), Address); return(STATUS_UNSUCCESSFUL); - } - if (PsGetCurrentProcess() == NULL) - { - /* Allow this! It lets us page alloc much earlier! It won't be needed - * after my init patch anyways - */ - DPRINT("No current process\n"); - if (Address < (ULONG_PTR)MmSystemRangeStart) - { - return(STATUS_ACCESS_VIOLATION); - } } /* Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c Tue Sep 4 22:19:59 2007 @@ -77,10 +77,8 @@ { PVOID BaseAddress; ULONG Length; - //ULONG ParamLength = KernelLength; NTSTATUS Status; PHYSICAL_ADDRESS BoundaryAddressMultiple; - PFN_TYPE Pfn; PMEMORY_AREA MArea; DPRINT("MmInitVirtualMemory(%x, %x)\n",LastKernelAddress, KernelLength); @@ -112,7 +110,7 @@ */ MiInitPageDirectoryMap(); - BaseAddress = (PVOID)KPCR_BASE; + BaseAddress = (PVOID)KIP0PCRADDRESS; MmCreateMemoryArea(MmGetKernelAddressSpace(), MEMORY_AREA_SYSTEM, &BaseAddress, @@ -158,91 +156,6 @@ 0, BoundaryAddressMultiple); -#if 0 - DPRINT1("LD Vars: %lx %lx %lx %lx %lx %lx. Last: %lx\n", - &_image_base__, - &_text_start__, - &_text_end__, - &_init_start__, - &_init_end__, - &_bss_end__, - LastKernelAddress); - BaseAddress = (PVOID)&_image_base__; - DPRINT1("Non-LD Vars: %lx %lx %lx %lx %lx %lx. Last: %lx\n", - 0, - 0, - 0, - 0, - 0, - 0, - LastKernelAddress); - Length = PAGE_ROUND_UP(((ULONG_PTR)&_text_end__)) - (ULONG_PTR)&_image_base__; - ParamLength = ParamLength - Length; - - /* - * No need to lock the address space at this point since no - * other threads are running. - */ - MmCreateMemoryArea(MmGetKernelAddressSpace(), - MEMORY_AREA_SYSTEM, - &BaseAddress, - Length, - PAGE_EXECUTE_READ, - &MArea, - TRUE, - 0, - BoundaryAddressMultiple); - - BaseAddress = (PVOID)PAGE_ROUND_UP(((ULONG_PTR)&_text_end__)); - ASSERT(BaseAddress == (PVOID)&_init_start__); - Length = PAGE_ROUND_UP(((ULONG_PTR)&_init_end__)) - - PAGE_ROUND_UP(((ULONG_PTR)&_text_end__)); - ParamLength = ParamLength - Length; - - MmCreateMemoryArea(MmGetKernelAddressSpace(), - MEMORY_AREA_SYSTEM, - &BaseAddress, - Length, - PAGE_EXECUTE_READ, - &MArea, - TRUE, - 0, - BoundaryAddressMultiple); - - Length = PAGE_ROUND_UP(((ULONG_PTR)&_bss_end__)) - - PAGE_ROUND_UP(((ULONG_PTR)&_init_end__)); - ParamLength = ParamLength - Length; - DPRINT("Length %x\n",Length); - BaseAddress = (PVOID)PAGE_ROUND_UP(((ULONG_PTR)&_init_end__)); - DPRINT("BaseAddress %x\n",BaseAddress); - - /* - * No need to lock the address space at this point since we are - * the only thread running. - */ - MmCreateMemoryArea(MmGetKernelAddressSpace(), - MEMORY_AREA_SYSTEM, - &BaseAddress, - Length, - PAGE_READWRITE, - &MArea, - TRUE, - 0, - BoundaryAddressMultiple); - - BaseAddress = (PVOID)PAGE_ROUND_UP(((ULONG_PTR)&_bss_end__)); - Length = LastKernelAddress - (ULONG_PTR)BaseAddress; - MmCreateMemoryArea(MmGetKernelAddressSpace(), - MEMORY_AREA_SYSTEM, - &BaseAddress, - Length, - PAGE_READWRITE, - &MArea, - TRUE, - 0, - BoundaryAddressMultiple); -#endif - BaseAddress = MiNonPagedPoolStart; MmCreateMemoryArea(MmGetKernelAddressSpace(), MEMORY_AREA_SYSTEM, @@ -281,18 +194,7 @@ TRUE, 0, BoundaryAddressMultiple); - Status = MmRequestPageMemoryConsumer(MC_NPPOOL, TRUE, &Pfn); - MmSharedDataPagePhysicalAddress.QuadPart = Pfn << PAGE_SHIFT; - Status = MmCreateVirtualMapping(NULL, - (PVOID)KI_USER_SHARED_DATA, - PAGE_READWRITE, - &Pfn, - 1); - if (!NT_SUCCESS(Status)) - { - DbgPrint("Unable to create virtual mapping\n"); - KEBUGCHECK(0); - } + MmSharedDataPagePhysicalAddress.QuadPart = 2 << PAGE_SHIFT; RtlZeroMemory(BaseAddress, Length); /* Modified: trunk/reactos/ntoskrnl/ob/obinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obinit.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obinit.c (original) +++ trunk/reactos/ntoskrnl/ob/obinit.c Tue Sep 4 22:19:59 2007 @@ -67,7 +67,7 @@ for (i = 0; i < KeNumberProcessors; i++) { /* Get the PRCB for this CPU */ - Prcb = ((PKPCR)(KPCR_BASE + i * PAGE_SIZE))->Prcb; + Prcb = ((PKPCR)(KIP0PCRADDRESS + i * PAGE_SIZE))->Prcb; /* Set the OBJECT_CREATE_INFORMATION List */ Prcb->PPLookasideList[LookasideCreateInfoList].L = &ObpCiLookasideList.L;
17 years, 3 months
1
0
0
0
[cfinck] 28851: Silence two warnings in cmlib. This makes the livecd part compiling warning-free on 32-bit systems. On 64-bit hosts, we still need to squash out this __cdecl warning.
by cfinck@svn.reactos.org
Author: cfinck Date: Tue Sep 4 20:05:44 2007 New Revision: 28851 URL:
http://svn.reactos.org/svn/reactos?rev=28851&view=rev
Log: Silence two warnings in cmlib. This makes the livecd part compiling warning-free on 32-bit systems. On 64-bit hosts, we still need to squash out this __cdecl warning. Modified: trunk/reactos/lib/cmlib/hiveinit.c Modified: trunk/reactos/lib/cmlib/hiveinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hiveinit.c?rev=2…
============================================================================== --- trunk/reactos/lib/cmlib/hiveinit.c (original) +++ trunk/reactos/lib/cmlib/hiveinit.c Tue Sep 4 20:05:44 2007 @@ -156,8 +156,8 @@ if (ChunkSize < sizeof(HBASE_BLOCK) || !HvpVerifyHiveHeader((PHBASE_BLOCK)ChunkBase)) { - DPRINT1("Registry is corrupt: ChunkSize %d < sizeof(HBASE_BLOCK) %d, " - "or HvpVerifyHiveHeader() failed\n", ChunkSize, sizeof(HBASE_BLOCK)); + DPRINT1("Registry is corrupt: ChunkSize %lu < sizeof(HBASE_BLOCK) %lu, " + "or HvpVerifyHiveHeader() failed\n", ChunkSize, (SIZE_T)sizeof(HBASE_BLOCK)); return STATUS_REGISTRY_CORRUPT; }
17 years, 3 months
1
0
0
0
[jimtabor] 28850: Moved code. Finding out when changing ownership, it will require the deallocation and allocation of old and new dcattr.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Sep 4 19:59:21 2007 New Revision: 28850 URL:
http://svn.reactos.org/svn/reactos?rev=28850&view=rev
Log: Moved code. Finding out when changing ownership, it will require the deallocation and allocation of old and new dcattr. Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/objects/dc.c Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h Tue Sep 4 19:59:21 2007 @@ -144,8 +144,9 @@ HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver); VOID FASTCALL DC_InitDC(HDC DCToInit); HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver); -VOID FASTCALL DC_FreeDC(HDC DCToFree); -VOID FASTCALL DC_FreeDcAttr(HDC); +VOID FASTCALL DC_FreeDC(HDC); +VOID FASTCALL DC_AllocateDcAttr(HDC, PEPROCESS); +VOID FASTCALL DC_FreeDcAttr(HDC, PEPROCESS); BOOL INTERNAL_CALL DC_Cleanup(PVOID ObjectBody); HDC FASTCALL DC_GetNextDC (PDC pDC); VOID FASTCALL DC_SetNextDC (PDC pDC, HDC hNextDC); Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Tue Sep 4 19:59:21 2007 @@ -1304,55 +1304,55 @@ /* FIXME - newdc can be NULL!!!! Don't assert here!!! */ ASSERT( newdc ); - newdc->w.flags = dc->w.flags | DC_SAVED; - newdc->Dc_Attr.hpen = dc->Dc_Attr.hpen; - newdc->Dc_Attr.hbrush = dc->Dc_Attr.hbrush; - newdc->Dc_Attr.hlfntNew = dc->Dc_Attr.hlfntNew; - newdc->w.hBitmap = dc->w.hBitmap; - newdc->w.hFirstBitmap = dc->w.hFirstBitmap; + newdc->w.flags = dc->w.flags | DC_SAVED; + newdc->Dc_Attr.hpen = dc->Dc_Attr.hpen; + newdc->Dc_Attr.hbrush = dc->Dc_Attr.hbrush; + newdc->Dc_Attr.hlfntNew = dc->Dc_Attr.hlfntNew; + newdc->w.hBitmap = dc->w.hBitmap; + newdc->w.hFirstBitmap = dc->w.hFirstBitmap; #if 0 - newdc->w.hDevice = dc->w.hDevice; + newdc->w.hDevice = dc->w.hDevice; #endif - newdc->PalIndexed = dc->PalIndexed; - newdc->w.hPalette = dc->w.hPalette; - newdc->w.totalExtent = dc->w.totalExtent; - newdc->w.bitsPerPixel = dc->w.bitsPerPixel; - newdc->Dc_Attr.jROP2 = dc->Dc_Attr.jROP2; - newdc->Dc_Attr.jFillMode = dc->Dc_Attr.jFillMode; + newdc->PalIndexed = dc->PalIndexed; + newdc->w.hPalette = dc->w.hPalette; + newdc->w.totalExtent = dc->w.totalExtent; + newdc->w.bitsPerPixel = dc->w.bitsPerPixel; + newdc->Dc_Attr.jROP2 = dc->Dc_Attr.jROP2; + newdc->Dc_Attr.jFillMode = dc->Dc_Attr.jFillMode; newdc->Dc_Attr.jStretchBltMode = dc->Dc_Attr.jStretchBltMode; - newdc->Dc_Attr.lRelAbs = dc->Dc_Attr.lRelAbs; - newdc->Dc_Attr.jBkMode = dc->Dc_Attr.jBkMode; - newdc->Dc_Attr.crBackgroundClr = dc->Dc_Attr.crBackgroundClr; - newdc->Dc_Attr.crForegroundClr = dc->Dc_Attr.crForegroundClr; - newdc->Dc_Attr.ptlBrushOrigin.x = dc->Dc_Attr.ptlBrushOrigin.x; - newdc->Dc_Attr.ptlBrushOrigin.y = dc->Dc_Attr.ptlBrushOrigin.y; + newdc->Dc_Attr.lRelAbs = dc->Dc_Attr.lRelAbs; + newdc->Dc_Attr.jBkMode = dc->Dc_Attr.jBkMode; + newdc->Dc_Attr.crBackgroundClr = dc->Dc_Attr.crBackgroundClr; + newdc->Dc_Attr.crForegroundClr = dc->Dc_Attr.crForegroundClr; + newdc->Dc_Attr.ptlBrushOrigin.x = dc->Dc_Attr.ptlBrushOrigin.x; + newdc->Dc_Attr.ptlBrushOrigin.y = dc->Dc_Attr.ptlBrushOrigin.y; newdc->Dc_Attr.lTextAlign = dc->Dc_Attr.lTextAlign; newdc->Dc_Attr.lTextExtra = dc->Dc_Attr.lTextExtra; - newdc->Dc_Attr.cBreak = dc->Dc_Attr.cBreak; + newdc->Dc_Attr.cBreak = dc->Dc_Attr.cBreak; newdc->Dc_Attr.lBreakExtra = dc->Dc_Attr.lBreakExtra; newdc->Dc_Attr.iMapMode = dc->Dc_Attr.iMapMode; newdc->Dc_Attr.iGraphicsMode = dc->Dc_Attr.iGraphicsMode; #if 0 /* Apparently, the DC origin is not changed by [GS]etDCState */ - newdc->w.DCOrgX = dc->w.DCOrgX; - newdc->w.DCOrgY = dc->w.DCOrgY; + newdc->w.DCOrgX = dc->w.DCOrgX; + newdc->w.DCOrgY = dc->w.DCOrgY; #endif - newdc->Dc_Attr.ptlCurrent.x = dc->Dc_Attr.ptlCurrent.x; - newdc->Dc_Attr.ptlCurrent.y = dc->Dc_Attr.ptlCurrent.y; - newdc->w.ArcDirection = dc->w.ArcDirection; - newdc->w.xformWorld2Wnd = dc->w.xformWorld2Wnd; - newdc->w.xformWorld2Vport = dc->w.xformWorld2Vport; - newdc->w.xformVport2World = dc->w.xformVport2World; - newdc->w.vport2WorldValid = dc->w.vport2WorldValid; + newdc->Dc_Attr.ptlCurrent.x = dc->Dc_Attr.ptlCurrent.x; + newdc->Dc_Attr.ptlCurrent.y = dc->Dc_Attr.ptlCurrent.y; + newdc->w.ArcDirection = dc->w.ArcDirection; + newdc->w.xformWorld2Wnd = dc->w.xformWorld2Wnd; + newdc->w.xformWorld2Vport = dc->w.xformWorld2Vport; + newdc->w.xformVport2World = dc->w.xformVport2World; + newdc->w.vport2WorldValid = dc->w.vport2WorldValid; DCU_UpdateUserXForms(newdc, WORLD_TO_PAGE_IDENTITY|DEVICE_TO_WORLD_INVALID|WORLD_XFORM_CHANGED ); - newdc->Dc_Attr.ptlWindowOrg.x = dc->Dc_Attr.ptlWindowOrg.x; - newdc->Dc_Attr.ptlWindowOrg.y = dc->Dc_Attr.ptlWindowOrg.y; - newdc->Dc_Attr.szlWindowExt.cx = dc->Dc_Attr.szlWindowExt.cx; - newdc->Dc_Attr.szlWindowExt.cy = dc->Dc_Attr.szlWindowExt.cy; - newdc->Dc_Attr.ptlViewportOrg.x = dc->Dc_Attr.ptlViewportOrg.x; - newdc->Dc_Attr.ptlViewportOrg.y = dc->Dc_Attr.ptlViewportOrg.y; - newdc->Dc_Attr.szlViewportExt.cx = dc->Dc_Attr.szlViewportExt.cx; - newdc->Dc_Attr.szlViewportExt.cy = dc->Dc_Attr.szlViewportExt.cy; + newdc->Dc_Attr.ptlWindowOrg.x = dc->Dc_Attr.ptlWindowOrg.x; + newdc->Dc_Attr.ptlWindowOrg.y = dc->Dc_Attr.ptlWindowOrg.y; + newdc->Dc_Attr.szlWindowExt.cx = dc->Dc_Attr.szlWindowExt.cx; + newdc->Dc_Attr.szlWindowExt.cy = dc->Dc_Attr.szlWindowExt.cy; + newdc->Dc_Attr.ptlViewportOrg.x = dc->Dc_Attr.ptlViewportOrg.x; + newdc->Dc_Attr.ptlViewportOrg.y = dc->Dc_Attr.ptlViewportOrg.y; + newdc->Dc_Attr.szlViewportExt.cx = dc->Dc_Attr.szlViewportExt.cx; + newdc->Dc_Attr.szlViewportExt.cy = dc->Dc_Attr.szlViewportExt.cy; newdc->hSelf = hnewdc; newdc->saveLevel = 0; @@ -1391,53 +1391,53 @@ { if ( dcs->w.flags & DC_SAVED ) { - dc->w.flags = dcs->w.flags & ~DC_SAVED; - - dc->w.hFirstBitmap = dcs->w.hFirstBitmap; + dc->w.flags = dcs->w.flags & ~DC_SAVED; + + dc->w.hFirstBitmap = dcs->w.hFirstBitmap; #if 0 - dc->w.hDevice = dcs->w.hDevice; + dc->w.hDevice = dcs->w.hDevice; #endif - dc->w.totalExtent = dcs->w.totalExtent; - dc->Dc_Attr.jROP2 = dcs->Dc_Attr.jROP2; - dc->Dc_Attr.jFillMode = dcs->Dc_Attr.jFillMode; + dc->w.totalExtent = dcs->w.totalExtent; + dc->Dc_Attr.jROP2 = dcs->Dc_Attr.jROP2; + dc->Dc_Attr.jFillMode = dcs->Dc_Attr.jFillMode; dc->Dc_Attr.jStretchBltMode = dcs->Dc_Attr.jStretchBltMode; - dc->Dc_Attr.lRelAbs = dcs->Dc_Attr.lRelAbs; - dc->Dc_Attr.jBkMode = dcs->Dc_Attr.jBkMode; - dc->Dc_Attr.crBackgroundClr = dcs->Dc_Attr.crBackgroundClr; - dc->Dc_Attr.crForegroundClr = dcs->Dc_Attr.crForegroundClr; - dc->Dc_Attr.ptlBrushOrigin.x = dcs->Dc_Attr.ptlBrushOrigin.x; - dc->Dc_Attr.ptlBrushOrigin.y = dcs->Dc_Attr.ptlBrushOrigin.y; + dc->Dc_Attr.lRelAbs = dcs->Dc_Attr.lRelAbs; + dc->Dc_Attr.jBkMode = dcs->Dc_Attr.jBkMode; + dc->Dc_Attr.crBackgroundClr = dcs->Dc_Attr.crBackgroundClr; + dc->Dc_Attr.crForegroundClr = dcs->Dc_Attr.crForegroundClr; + dc->Dc_Attr.ptlBrushOrigin.x = dcs->Dc_Attr.ptlBrushOrigin.x; + dc->Dc_Attr.ptlBrushOrigin.y = dcs->Dc_Attr.ptlBrushOrigin.y; dc->Dc_Attr.lTextAlign = dcs->Dc_Attr.lTextAlign; dc->Dc_Attr.lTextExtra = dcs->Dc_Attr.lTextExtra; - dc->Dc_Attr.cBreak = dcs->Dc_Attr.cBreak; + dc->Dc_Attr.cBreak = dcs->Dc_Attr.cBreak; dc->Dc_Attr.lBreakExtra = dcs->Dc_Attr.lBreakExtra; dc->Dc_Attr.iMapMode = dcs->Dc_Attr.iMapMode; dc->Dc_Attr.iGraphicsMode = dcs->Dc_Attr.iGraphicsMode; #if 0 /* Apparently, the DC origin is not changed by [GS]etDCState */ - dc->w.DCOrgX = dcs->w.DCOrgX; - dc->w.DCOrgY = dcs->w.DCOrgY; + dc->w.DCOrgX = dcs->w.DCOrgX; + dc->w.DCOrgY = dcs->w.DCOrgY; #endif - dc->Dc_Attr.ptlCurrent.x = dcs->Dc_Attr.ptlCurrent.x; - dc->Dc_Attr.ptlCurrent.y = dcs->Dc_Attr.ptlCurrent.y; - dc->w.ArcDirection = dcs->w.ArcDirection; - - dc->w.xformWorld2Wnd = dcs->w.xformWorld2Wnd; - dc->w.xformWorld2Vport = dcs->w.xformWorld2Vport; - dc->w.xformVport2World = dcs->w.xformVport2World; - dc->w.vport2WorldValid = dcs->w.vport2WorldValid; + dc->Dc_Attr.ptlCurrent.x = dcs->Dc_Attr.ptlCurrent.x; + dc->Dc_Attr.ptlCurrent.y = dcs->Dc_Attr.ptlCurrent.y; + dc->w.ArcDirection = dcs->w.ArcDirection; + + dc->w.xformWorld2Wnd = dcs->w.xformWorld2Wnd; + dc->w.xformWorld2Vport = dcs->w.xformWorld2Vport; + dc->w.xformVport2World = dcs->w.xformVport2World; + dc->w.vport2WorldValid = dcs->w.vport2WorldValid; DCU_UpdateUserXForms(dc, WORLD_TO_PAGE_IDENTITY|DEVICE_TO_WORLD_INVALID|WORLD_XFORM_CHANGED ); - dc->Dc_Attr.ptlWindowOrg.x = dcs->Dc_Attr.ptlWindowOrg.x; - dc->Dc_Attr.ptlWindowOrg.y = dcs->Dc_Attr.ptlWindowOrg.y; - dc->Dc_Attr.szlWindowExt.cx = dcs->Dc_Attr.szlWindowExt.cx; - dc->Dc_Attr.szlWindowExt.cy = dcs->Dc_Attr.szlWindowExt.cy; - dc->Dc_Attr.ptlViewportOrg.x = dcs->Dc_Attr.ptlViewportOrg.x; - dc->Dc_Attr.ptlViewportOrg.y = dcs->Dc_Attr.ptlViewportOrg.y; - dc->Dc_Attr.szlViewportExt.cx = dcs->Dc_Attr.szlViewportExt.cx; - dc->Dc_Attr.szlViewportExt.cy = dcs->Dc_Attr.szlViewportExt.cy; - dc->PalIndexed = dcs->PalIndexed; + dc->Dc_Attr.ptlWindowOrg.x = dcs->Dc_Attr.ptlWindowOrg.x; + dc->Dc_Attr.ptlWindowOrg.y = dcs->Dc_Attr.ptlWindowOrg.y; + dc->Dc_Attr.szlWindowExt.cx = dcs->Dc_Attr.szlWindowExt.cx; + dc->Dc_Attr.szlWindowExt.cy = dcs->Dc_Attr.szlWindowExt.cy; + dc->Dc_Attr.ptlViewportOrg.x = dcs->Dc_Attr.ptlViewportOrg.x; + dc->Dc_Attr.ptlViewportOrg.y = dcs->Dc_Attr.ptlViewportOrg.y; + dc->Dc_Attr.szlViewportExt.cx = dcs->Dc_Attr.szlViewportExt.cx; + dc->Dc_Attr.szlViewportExt.cy = dcs->Dc_Attr.szlViewportExt.cy; + dc->PalIndexed = dcs->PalIndexed; if (!(dc->w.flags & DC_MEMORY)) { @@ -1952,6 +1952,7 @@ if (!PATH_AssignGdiPath (&dcs->w.path, &dc->w.path)) { NtGdiDeleteObjectApp (hdcs); + return 0; } #endif @@ -2367,41 +2368,11 @@ } return NULL; } -//#if 0 - PVOID NewMem = NULL; - ULONG MemSize = sizeof(DC_ATTR); //PAGE_SIZE it will allocate that size - NTSTATUS Status = ZwAllocateVirtualMemory(NtCurrentProcess(), - &NewMem, - 0, - &MemSize, - MEM_COMMIT|MEM_RESERVE, - PAGE_READWRITE); - KeEnterCriticalRegion(); - { - INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hDC); - PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index]; - - if (NT_SUCCESS(Status)) - { - RtlZeroMemory(NewMem, MemSize); - Entry->UserData = NewMem; - DPRINT("DC_ATTR allocated! 0x%x\n",NewMem); - } - else - { - DPRINT("DC_ATTR not allocated!\n"); - } - } - KeLeaveCriticalRegion(); -//#endif + + DC_AllocateDcAttr(hDC, NULL); + NewDC = DC_LockDc(hDC); /* FIXME - Handle NewDC == NULL! */ -//#if 0 - if(NewMem) - { - NewDC->pDc_Attr = NewMem; // Store pointer - } -//#endif if (Driver != NULL) { RtlCopyMemory(&NewDC->DriverName, Driver, sizeof(UNICODE_STRING)); @@ -2481,8 +2452,57 @@ VOID FASTCALL -DC_FreeDcAttr(HDC DCToFree) -{ +DC_AllocateDcAttr(HDC hDC, PEPROCESS Owner) +{ +//#if 0 + PVOID NewMem = NULL; + HANDLE Pid = NtCurrentProcess(); + ULONG MemSize = sizeof(DC_ATTR); //PAGE_SIZE it will allocate that size + + if(Owner) Pid = PsGetProcessId(Owner); + NTSTATUS Status = ZwAllocateVirtualMemory(Pid, + &NewMem, + 0, + &MemSize, + MEM_COMMIT|MEM_RESERVE, + PAGE_READWRITE); + KeEnterCriticalRegion(); + { + INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)hDC); + PGDI_TABLE_ENTRY Entry = &GdiHandleTable->Entries[Index]; + + if (NT_SUCCESS(Status)) + { + RtlZeroMemory(NewMem, MemSize); + Entry->UserData = NewMem; + DPRINT("DC_ATTR allocated! 0x%x\n",NewMem); + } + else + { + DPRINT("DC_ATTR not allocated!\n"); + } + } + KeLeaveCriticalRegion(); + PDC pDC = DC_LockDc(hDC); + if(NewMem) + { + pDC->pDc_Attr = NewMem; // Store pointer + } + DC_UnlockDc(pDC); +//#endif +} + +VOID +FASTCALL +DC_FreeDcAttr(HDC DCToFree, PEPROCESS Owner) +{ + HANDLE Pid = NtCurrentProcess(); + PDC pDC = DC_LockDc(DCToFree); + if (pDC->pDc_Attr == &pDC->Dc_Attr) return; // Internal DC object! + pDC->pDc_Attr = NULL; + DC_UnlockDc(pDC); + if(Owner) Pid = PsGetProcessId(Owner); + KeEnterCriticalRegion(); { INT Index = GDI_HANDLE_GET_INDEX((HGDIOBJ)DCToFree); @@ -2490,10 +2510,10 @@ if(Entry->UserData) { ULONG MemSize = sizeof(DC_ATTR); //PAGE_SIZE; - NTSTATUS Status = ZwFreeVirtualMemory(NtCurrentProcess(), - &Entry->UserData, - &MemSize, - MEM_DECOMMIT); + NTSTATUS Status = ZwFreeVirtualMemory(Pid, + &Entry->UserData, + &MemSize, + MEM_DECOMMIT); if (NT_SUCCESS(Status)) { DPRINT("DC_FreeDC DC_ATTR 0x%x\n", Entry->UserData); @@ -2508,7 +2528,7 @@ DC_FreeDC(HDC DCToFree) { //#if 0 - DC_FreeDcAttr(DCToFree); + DC_FreeDcAttr(DCToFree, NULL); //#endif if (!GDIOBJ_FreeObj(GdiHandleTable, DCToFree, GDI_OBJECT_TYPE_DC)) { @@ -2587,6 +2607,7 @@ { PDC DC; +// DC_FreeDcAttr(hDC, NULL); GDIOBJ_SetOwnership(GdiHandleTable, hDC, Owner); DC = DC_LockDc(hDC); if (NULL != DC) @@ -2605,6 +2626,7 @@ } DC_UnlockDc(DC); } +// DC_AllocateDcAttr(hDC, Owner); } BOOL FASTCALL
17 years, 3 months
1
0
0
0
[cwittich] 28849: forgot to commit this file
by cwittich@svn.reactos.org
Author: cwittich Date: Tue Sep 4 18:50:11 2007 New Revision: 28849 URL:
http://svn.reactos.org/svn/reactos?rev=28849&view=rev
Log: forgot to commit this file Modified: trunk/reactos/base/applications/cmdutils/cmdutils.rbuild Modified: trunk/reactos/base/applications/cmdutils/cmdutils.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/cmdutils.rbuild (original) +++ trunk/reactos/base/applications/cmdutils/cmdutils.rbuild Tue Sep 4 18:50:11 2007 @@ -1,4 +1,7 @@ <group> +<directory name="dbgprint"> + <xi:include href="dbgprint/dbgprint.rbuild" /> +</directory> <directory name="find"> <xi:include href="find/find.rbuild" /> </directory>
17 years, 3 months
1
0
0
0
← Newer
1
...
44
45
46
47
48
49
50
...
59
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
Results per page:
10
25
50
100
200