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 2012
----- 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
14 participants
211 discussions
Start a n
N
ew thread
[mnordell] 57530: Hopefully fix a MultiByteToWideChar issue with UTF8.
by mnordell@svn.reactos.org
Author: mnordell Date: Wed Oct 10 20:33:45 2012 New Revision: 57530 URL:
http://svn.reactos.org/svn/reactos?rev=57530&view=rev
Log: Hopefully fix a MultiByteToWideChar issue with UTF8. Modified: trunk/reactos/dll/win32/kernel32/winnls/string/nls.c Modified: trunk/reactos/dll/win32/kernel32/winnls/string/nls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
============================================================================== --- trunk/reactos/dll/win32/kernel32/winnls/string/nls.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/winnls/string/nls.c [iso-8859-1] Wed Oct 10 20:33:45 2012 @@ -359,7 +359,7 @@ WCHAR WideChar; LONG Count; - if (Flags != 0) + if (Flags != 0 && Flags != MB_ERR_INVALID_CHARS) { SetLastError(ERROR_INVALID_FLAGS); return 0;
12 years, 2 months
1
0
0
0
[mnordell] 57529: Test for MultiByteToWideChar added. Still needs alot fleshing out.
by mnordell@svn.reactos.org
Author: mnordell Date: Wed Oct 10 19:10:49 2012 New Revision: 57529 URL:
http://svn.reactos.org/svn/reactos?rev=57529&view=rev
Log: Test for MultiByteToWideChar added. Still needs alot fleshing out. Added: trunk/rostests/apitests/kernel32/MultiByteToWideChar.c (with props) Modified: trunk/rostests/apitests/kernel32/CMakeLists.txt trunk/rostests/apitests/kernel32/testlist.c Modified: trunk/rostests/apitests/kernel32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/CMakeLi…
============================================================================== --- trunk/rostests/apitests/kernel32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/kernel32/CMakeLists.txt [iso-8859-1] Wed Oct 10 19:10:49 2012 @@ -6,6 +6,7 @@ GetDriveType.c GetModuleFileName.c lstrcpynW.c + MultiByteToWideChar.c SetCurrentDirectory.c SetUnhandledExceptionFilter.c testlist.c) Added: trunk/rostests/apitests/kernel32/MultiByteToWideChar.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/MultiBy…
============================================================================== --- trunk/rostests/apitests/kernel32/MultiByteToWideChar.c (added) +++ trunk/rostests/apitests/kernel32/MultiByteToWideChar.c [iso-8859-1] Wed Oct 10 19:10:49 2012 @@ -1,0 +1,22 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for MultiByteToWideChar + * PROGRAMMER: Mike "tamlin" Nordell + */ + +#include <windows.h> +#include <stdio.h> +#include <wine/test.h> + + +START_TEST(MultiByteToWideChar) +{ + int ret; + + ret = MultiByteToWideChar(CP_UTF8, 0, "a", sizeof("a"), 0, 0); + ok(ret == 2, "ret should be 2, is %d\n", ret); + + ret = MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS, "a", sizeof("a"), 0, 0); + ok(ret == 2, "ret should be 2, is %d\n", ret); +} Propchange: trunk/rostests/apitests/kernel32/MultiByteToWideChar.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/kernel32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/kernel32/testlis…
============================================================================== --- trunk/rostests/apitests/kernel32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/kernel32/testlist.c [iso-8859-1] Wed Oct 10 19:10:49 2012 @@ -9,6 +9,7 @@ extern void func_GetDriveType(void); extern void func_GetModuleFileName(void); extern void func_lstrcpynW(void); +extern void func_MultiByteToWideChar(void); extern void func_SetCurrentDirectory(void); extern void func_SetUnhandledExceptionFilter(void); @@ -18,6 +19,7 @@ { "GetDriveType", func_GetDriveType }, { "GetModuleFileName", func_GetModuleFileName }, { "lstrcpynW", func_lstrcpynW }, + { "MultiByteToWideChar", func_MultiByteToWideChar }, { "SetCurrentDirectory", func_SetCurrentDirectory }, { "SetUnhandledExceptionFilter", func_SetUnhandledExceptionFilter},
12 years, 2 months
1
0
0
0
[hbelusca] 57528: [MSVCRT:APITEST] Update encoding, no code changes.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Oct 9 22:08:32 2012 New Revision: 57528 URL:
http://svn.reactos.org/svn/reactos?rev=57528&view=rev
Log: [MSVCRT:APITEST] Update encoding, no code changes. Modified: trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h trunk/rostests/apitests/msvcrt/CommandLine.c Modified: trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CmdLineUt…
============================================================================== --- trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c [iso-8859-1] Tue Oct 9 22:08:32 2012 @@ -2,7 +2,7 @@ * PROJECT: ReactOS API Tests * LICENSE: GPLv2+ - See COPYING in the top level directory * PURPOSE: Test for CRT command-line handling - Utility GUI program. - * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> + * PROGRAMMER: Hermès BÃLUSCA - MAÃTO <hermes.belusca(a)sfr.fr> */ #define WIN32_NO_STATUS Modified: trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CmdLineUt…
============================================================================== --- trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h [iso-8859-1] Tue Oct 9 22:08:32 2012 @@ -2,7 +2,7 @@ * PROJECT: ReactOS API Tests * LICENSE: GPLv2+ - See COPYING in the top level directory * PURPOSE: Test for CRT command-line handling - Utility GUI program. - * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> + * PROGRAMMER: Hermès BÃLUSCA - MAÃTO <hermes.belusca(a)sfr.fr> */ #pragma once Modified: trunk/rostests/apitests/msvcrt/CommandLine.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CommandLi…
============================================================================== --- trunk/rostests/apitests/msvcrt/CommandLine.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CommandLine.c [iso-8859-1] Tue Oct 9 22:08:32 2012 @@ -2,7 +2,7 @@ * PROJECT: ReactOS API Tests * LICENSE: GPLv2+ - See COPYING in the top level directory * PURPOSE: Test for CRT command-line handling. - * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> + * PROGRAMMER: Hermès BÃLUSCA - MAÃTO <hermes.belusca(a)sfr.fr> */ #define WIN32_NO_STATUS
12 years, 2 months
1
0
0
0
[hbelusca] 57527: [MSVCRT:APITEST] Move cmdline_util to CmdLineUtil and locate it in bin/data instead of bin
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Oct 9 22:03:50 2012 New Revision: 57527 URL:
http://svn.reactos.org/svn/reactos?rev=57527&view=rev
Log: [MSVCRT:APITEST] Move cmdline_util to CmdLineUtil and locate it in bin/data instead of bin Added: trunk/rostests/apitests/msvcrt/CmdLineUtil/ - copied from r57524, trunk/rostests/apitests/msvcrt/cmdline_util/ trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c (with props) trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h (with props) Removed: trunk/rostests/apitests/msvcrt/CmdLineUtil/cmdline_util.c trunk/rostests/apitests/msvcrt/cmdline_util/ Modified: trunk/rostests/apitests/msvcrt/CMakeLists.txt trunk/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt trunk/rostests/apitests/msvcrt/CommandLine.c Modified: trunk/rostests/apitests/msvcrt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CMakeList…
============================================================================== --- trunk/rostests/apitests/msvcrt/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CMakeLists.txt [iso-8859-1] Tue Oct 9 22:03:50 2012 @@ -1,7 +1,5 @@ -add_subdirectory(cmdline_util) - -add_definitions(-D_DLL -D__USE_CRTIMP) +add_subdirectory(CmdLineUtil) list(APPEND SOURCE CommandLine.c Modified: trunk/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CmdLineUt…
============================================================================== --- trunk/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CmdLineUtil/CMakeLists.txt [iso-8859-1] Tue Oct 9 22:03:50 2012 @@ -1,10 +1,8 @@ - -add_definitions(-D_DLL -D__USE_CRTIMP) list(APPEND SOURCE - cmdline_util.c) + CmdLineUtil.c) -add_executable(cmdline_util ${SOURCE}) -set_module_type(cmdline_util win32gui UNICODE) -add_importlibs(cmdline_util msvcrt kernel32 ntdll) -add_cd_file(TARGET cmdline_util DESTINATION reactos/bin FOR all) +add_executable(CmdLineUtil ${SOURCE}) +set_module_type(CmdLineUtil win32gui UNICODE) +add_importlibs(CmdLineUtil msvcrt kernel32 ntdll) +add_cd_file(TARGET CmdLineUtil DESTINATION reactos/bin/data FOR all) Added: trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CmdLineUt…
============================================================================== --- trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c (added) +++ trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c [iso-8859-1] Tue Oct 9 22:03:50 2012 @@ -1,0 +1,96 @@ +/* + * PROJECT: ReactOS API Tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for CRT command-line handling - Utility GUI program. + * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> + */ + +#define WIN32_NO_STATUS +#include <stdio.h> +#include <windows.h> +#include <ndk/ntndk.h> + +#include "CmdLineUtil.h" + +int APIENTRY wWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPWSTR lpCmdLine, + int nCmdShow) +{ + /* + * Get the unparsed command line as seen in Win32 mode, + * and the NT-native mode one. + */ + LPWSTR CmdLine = GetCommandLineW(); + UNICODE_STRING CmdLine_U = NtCurrentPeb()->ProcessParameters->CommandLine; + + /* Write the results into a file. */ + HANDLE hFile = CreateFileW(DATAFILE, + GENERIC_WRITE, + 0, NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + DWORD dwSize, dwStringSize; + + /* + * Format of the data file : + * + * [size_of_string 4 bytes][null_terminated_C_string] + * [size_of_string 4 bytes][null_terminated_C_string] + * [UNICODE_STRING_structure][string_buffer_of_UNICODE_STRING] + */ + + /* 1- Write the WinMain's command line. */ + dwStringSize = (wcslen(lpCmdLine) + 1) * sizeof(WCHAR); + + WriteFile(hFile, + &dwStringSize, + sizeof(dwStringSize), + &dwSize, + NULL); + + WriteFile(hFile, + lpCmdLine, + dwStringSize, + &dwSize, + NULL); + + /* 2- Write the Win32 mode command line. */ + dwStringSize = (wcslen(CmdLine) + 1) * sizeof(WCHAR); + + WriteFile(hFile, + &dwStringSize, + sizeof(dwStringSize), + &dwSize, + NULL); + + WriteFile(hFile, + CmdLine, + dwStringSize, + &dwSize, + NULL); + + /* 3- Finally, write the UNICODE_STRING command line. */ + WriteFile(hFile, + &CmdLine_U, + sizeof(CmdLine_U), + &dwSize, + NULL); + + WriteFile(hFile, + CmdLine_U.Buffer, + CmdLine_U.Length, + &dwSize, + NULL); + + /* Now close the file. */ + CloseHandle(hFile); + } + + return 0; +} + +/* EOF */ Propchange: trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CmdLineUt…
============================================================================== --- trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h (added) +++ trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h [iso-8859-1] Tue Oct 9 22:03:50 2012 @@ -1,0 +1,13 @@ +/* + * PROJECT: ReactOS API Tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for CRT command-line handling - Utility GUI program. + * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> + */ + +#pragma once + +// The path to the data file. +#define DATAFILE L"C:\\cmdline.dat" + +/* EOF */ Propchange: trunk/rostests/apitests/msvcrt/CmdLineUtil/CmdLineUtil.h ------------------------------------------------------------------------------ svn:eol-style = native Removed: trunk/rostests/apitests/msvcrt/CmdLineUtil/cmdline_util.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/cmdline_u…
============================================================================== --- trunk/rostests/apitests/msvcrt/CmdLineUtil/cmdline_util.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CmdLineUtil/cmdline_util.c (removed) @@ -1,94 +1,0 @@ -/* - * PROJECT: ReactOS API Tests - * LICENSE: GPLv2+ - See COPYING in the top level directory - * PURPOSE: Test for CRT command-line handling - Utility GUI program. - * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> - */ - -#define WIN32_NO_STATUS -#include <stdio.h> -#include <windows.h> -#include <ndk/ntndk.h> - -int APIENTRY wWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPWSTR lpCmdLine, - int nCmdShow) -{ - /* - * Get the unparsed command line as seen in Win32 mode, - * and the NT-native mode one. - */ - LPWSTR CmdLine = GetCommandLineW(); - UNICODE_STRING CmdLine_U = NtCurrentPeb()->ProcessParameters->CommandLine; - - /* Write the results into a file. */ - HANDLE hFile = CreateFileW(L"C:\\cmdline.dat", - GENERIC_WRITE, - 0, NULL, - CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, - NULL); - if (hFile != INVALID_HANDLE_VALUE) - { - DWORD dwSize, dwStringSize; - - /* - * Format of the data file : - * - * [size_of_string 4 bytes][null_terminated_C_string] - * [size_of_string 4 bytes][null_terminated_C_string] - * [UNICODE_STRING_structure][string_buffer_of_UNICODE_STRING] - */ - - /* 1- Write the WinMain's command line. */ - dwStringSize = (wcslen(lpCmdLine) + 1) * sizeof(WCHAR); - - WriteFile(hFile, - &dwStringSize, - sizeof(dwStringSize), - &dwSize, - NULL); - - WriteFile(hFile, - lpCmdLine, - dwStringSize, - &dwSize, - NULL); - - /* 2- Write the Win32 mode command line. */ - dwStringSize = (wcslen(CmdLine) + 1) * sizeof(WCHAR); - - WriteFile(hFile, - &dwStringSize, - sizeof(dwStringSize), - &dwSize, - NULL); - - WriteFile(hFile, - CmdLine, - dwStringSize, - &dwSize, - NULL); - - /* 3- Finally, write the UNICODE_STRING command line. */ - WriteFile(hFile, - &CmdLine_U, - sizeof(CmdLine_U), - &dwSize, - NULL); - - WriteFile(hFile, - CmdLine_U.Buffer, - CmdLine_U.Length, - &dwSize, - NULL); - - /* Now close the file. */ - CloseHandle(hFile); - } - - return 0; -} - -/* EOF */ Modified: trunk/rostests/apitests/msvcrt/CommandLine.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CommandLi…
============================================================================== --- trunk/rostests/apitests/msvcrt/CommandLine.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CommandLine.c [iso-8859-1] Tue Oct 9 22:03:50 2012 @@ -11,20 +11,16 @@ #include <wine/test.h> #include <ndk/ntndk.h> +#include "./CmdLineUtil/CmdLineUtil.h" + #define COUNT_OF(x) (sizeof((x))/sizeof((x)[0])) - -/* - * The path to the data file is hardcoded in cmdline_util.c - * Please synchronize it whenever you do a change. - */ -#define DATAFILE L"C:\\cmdline.dat" /** * Extracts the command tail from the command line * (deletes the program's name and keep the rest). **/ #define SPACECHAR L' ' -#define DQUOTECHAR L'\"' +#define DQUOTECHAR L'"' LPWSTR ExtractCmdLine(IN LPWSTR lpszCommandLine) { @@ -98,18 +94,18 @@ static TEST_CASE TestCases[] = { - {L"cmdline_util.exe"}, - {L"cmdline_util.exe foo bar"}, - {L"cmdline_util.exe \"foo bar\""}, - {L"cmdline_util.exe foo \"bar John\" Doe"}, - - {L"\"cmdline_util.exe\""}, - {L"\"cmdline_util.exe\" foo bar"}, - {L"\"cmdline_util.exe\" \"foo bar\""}, - {L"\"cmdline_util.exe\" foo \"bar John\" Doe"}, - - {L"\"cmdline_util.exe\""}, - {L"\"cmdline_util.exe \"foo bar\"\""}, + {L"CmdLineUtil.exe"}, + {L"CmdLineUtil.exe foo bar"}, + {L"CmdLineUtil.exe \"foo bar\""}, + {L"CmdLineUtil.exe foo \"bar John\" Doe"}, + + {L"\"CmdLineUtil.exe\""}, + {L"\"CmdLineUtil.exe\" foo bar"}, + {L"\"CmdLineUtil.exe\" \"foo bar\""}, + {L"\"CmdLineUtil.exe\" foo \"bar John\" Doe"}, + + {L"\"CmdLineUtil.exe\""}, + {L"\"CmdLineUtil.exe \"foo bar\"\""}, }; static void Test_CommandLine(IN ULONG TestNumber, @@ -237,6 +233,7 @@ ExtractCmdLine_U(&NTCmdLine); /* Print the results */ + /* *(LPWSTR)((ULONG_PTR)NTCmdLine.Buffer + NTCmdLine.Length) = 0; printf("WinMain cmdline = '%S'\n" "Win32 cmdline = '%S'\n" @@ -245,6 +242,7 @@ WinMainCmdLine, Win32CmdLine, NTCmdLine.Buffer, NTCmdLine.Length); + */ /* * Now check the results.
12 years, 2 months
1
0
0
0
[hbelusca] 57526: [BOOTDATA-CMAKE] Add a bin\data directory for holding data files which can be used for tests.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Oct 9 22:00:47 2012 New Revision: 57526 URL:
http://svn.reactos.org/svn/reactos?rev=57526&view=rev
Log: [BOOTDATA-CMAKE] Add a bin\data directory for holding data files which can be used for tests. Modified: trunk/reactos/boot/bootdata/hivesys_amd64.inf trunk/reactos/boot/bootdata/hivesys_arm.inf trunk/reactos/boot/bootdata/hivesys_i386.inf trunk/reactos/boot/bootdata/packages/reactos.dff.in trunk/reactos/cmake/CMakeMacros.cmake Modified: trunk/reactos/boot/bootdata/hivesys_amd64.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys_amd6…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys_amd64.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys_amd64.inf [iso-8859-1] Tue Oct 9 22:00:47 2012 @@ -1200,7 +1200,7 @@ ; System environment settings HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\bin\data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP" Modified: trunk/reactos/boot/bootdata/hivesys_arm.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys_arm.…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys_arm.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys_arm.inf [iso-8859-1] Tue Oct 9 22:00:47 2012 @@ -755,7 +755,7 @@ ; System environment settings HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\bin\data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP" Modified: trunk/reactos/boot/bootdata/hivesys_i386.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys_i386…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys_i386.inf [iso-8859-1] Tue Oct 9 22:00:47 2012 @@ -1200,7 +1200,7 @@ ; System environment settings HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","ComSpec",0x00020000,"%SystemRoot%\system32\cmd.exe" -HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" +HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","Path",0x00020000,"%SystemRoot%\bin;%SystemRoot%\bin\data;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","windir",0x00020000,"%SystemRoot%" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TEMP",0x00020000,"%SystemDrive%\TEMP" HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Environment","TMP",0x00020000,"%SystemDrive%\TEMP" Modified: trunk/reactos/boot/bootdata/packages/reactos.dff.in URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff.in [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff.in [iso-8859-1] Tue Oct 9 22:00:47 2012 @@ -21,12 +21,13 @@ 5 = system32\drivers\etc 6 = inf 7 = bin -8 = media -9 =
Microsoft.NET
-10 = Microsoft.NET\Framework -11 = Microsoft.NET\Framework\v1.0.3705 -12 = Microsoft.NET\Framework\v1.1.4322 -13 = Microsoft.NET\Framework\v2.0.50727 +8 = bin\data +9 = media +10 =
Microsoft.NET
+11 = Microsoft.NET\Framework +12 = Microsoft.NET\Framework\v1.0.3705 +13 = Microsoft.NET\Framework\v1.1.4322 +14 = Microsoft.NET\Framework\v2.0.50727 .InfEnd @@ -59,4 +60,4 @@ modules\optional\wine_gecko-1.0.0-x86.cab 4 optional boot\bootdata\bootcdregtest\AHKAppTests.cmd 7 optional -modules\wallpaper\Angelus_02_ROSWP.bmp 4 optional +modules\wallpaper\Angelus_02_ROSWP.bmp 4 optional Modified: trunk/reactos/cmake/CMakeMacros.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/CMakeMacros.cmake?re…
============================================================================== --- trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/CMakeMacros.cmake [iso-8859-1] Tue Oct 9 22:00:47 2012 @@ -97,18 +97,20 @@ set(${var} 6) elseif(${dir} STREQUAL reactos/bin) set(${var} 7) + elseif(${dir} STREQUAL reactos/bin/data) + set(${var} 8) elseif(${dir} STREQUAL reactos/media) - set(${var} 8) + set(${var} 9) elseif(${dir} STREQUAL
reactos/Microsoft.NET
) - set(${var} 9) + set(${var} 10) elseif(${dir} STREQUAL
reactos/Microsoft.NET/Framework
) - set(${var} 10) + set(${var} 11) elseif(${dir} STREQUAL
reactos/Microsoft.NET/Framework/v1.0.3705
) - set(${var} 11) + set(${var} 12) elseif(${dir} STREQUAL
reactos/Microsoft.NET/Framework/v1.1.4322
) - set(${var} 12) + set(${var} 13) elseif(${dir} STREQUAL
reactos/Microsoft.NET/Framework/v2.0.50727
) - set(${var} 13) + set(${var} 14) else() message(ERROR "Wrong destination: ${dir}") endif()
12 years, 2 months
1
0
0
0
[akhaldi] 57525: [UNIATA] * Sync to 0.44b4. CORE-6563
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Oct 9 21:02:00 2012 New Revision: 57525 URL:
http://svn.reactos.org/svn/reactos?rev=57525&view=rev
Log: [UNIATA] * Sync to 0.44b4. CORE-6563 Modified: trunk/reactos/drivers/storage/ide/uniata/bsmaster.h trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp trunk/reactos/drivers/storage/ide/uniata/id_init.cpp trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp trunk/reactos/drivers/storage/ide/uniata/scsi.h trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h Modified: trunk/reactos/drivers/storage/ide/uniata/bsmaster.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/bsmaster.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/bsmaster.h [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -623,6 +623,9 @@ #define IDX_AHCI_P_TFD (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, TFD)) #define IDX_AHCI_P_SIG (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SIG)) #define IDX_AHCI_P_CMD (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, CMD)) +#define IDX_AHCI_P_SStatus (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SStatus)) +#define IDX_AHCI_P_SControl (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SControl)) +#define IDX_AHCI_P_SError (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SError)) #define IDX_AHCI_P_ACT (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SACT)) #define IDX_AHCI_P_SNTF (FIELD_OFFSET(IDE_AHCI_PORT_REGISTERS, SNTF)) Modified: trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_ata.cpp [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -6976,11 +6976,16 @@ } // check if DMA read/write - if(deviceExtension->HwFlags & UNIATA_SATA) { + if(deviceExtension->HwFlags & UNIATA_AHCI) { KdPrint2((PRINT_PREFIX "AtapiSendCommand: force use dma (ahci)\n")); use_dma = TRUE; goto setup_dma; } else +/* if((deviceExtension->HwFlags & UNIATA_SATA) && (LunExt->OrigTransferMode >= ATA_DMA)) { + KdPrint2((PRINT_PREFIX "AtapiSendCommand: force use dma (sata)\n")); + use_dma = TRUE; + goto setup_dma; + } else*/ if(Srb->Cdb[0] == SCSIOP_REQUEST_SENSE) { KdPrint2((PRINT_PREFIX "AtapiSendCommand: SCSIOP_REQUEST_SENSE, no DMA setup\n")); } else @@ -7434,6 +7439,28 @@ LunExt->IdentifyData.AtapiCmdSize ? 8 : 6, 0); + GetStatus(chan, statusByte); + KdPrint3((PRINT_PREFIX "AtapiSendCommand: cmd status (%#x)\n", statusByte)); + + if(statusByte & IDE_STATUS_ERROR) { + GetBaseStatus(chan, statusByte); + KdPrint3((PRINT_PREFIX "AtapiSendCommand: Error on cmd: (%#x)\n", statusByte)); + // Read the error reg. to clear it and fail this request. + AtaReq->ReqState = REQ_STATE_TRANSFER_COMPLETE; + return MapError(deviceExtension, Srb); + } +/* if(statusByte & IDE_STATUS_DSC) { + KdPrint3((PRINT_PREFIX "AtapiSendCommand: DSC on cmd: (%#x)\n", statusByte)); + // Read the error reg. to clear it and fail this request. + statusByte = AtapiReadPort1(chan, IDX_IO1_i_Error); + KdPrint3((PRINT_PREFIX "AtapiSendCommand: Err on cmd: (%#x)\n", statusByte)); + if(statusByte >> 4) { + GetBaseStatus(chan, statusByte); + AtaReq->ReqState = REQ_STATE_TRANSFER_COMPLETE; + return MapError(deviceExtension, Srb); + } + } +*/ if(chan->ChannelCtrlFlags & CTRFLAGS_DMA_OPERATION) { AtapiDmaStart(HwDeviceExtension, DeviceNumber, lChannel, Srb); } @@ -7642,7 +7669,7 @@ // Fill in vendor identification fields. for (i = 0; i < 24; i += 2) { - MOV_DW_SWP(inquiryData->VendorId[i], ((PUCHAR)identifyData->ModelNumber)[i]); + MOV_DW_SWP(inquiryData->DeviceIdentificationString[i], ((PUCHAR)identifyData->ModelNumber)[i]); } /* // Initialize unused portion of product id. @@ -10732,6 +10759,8 @@ PUCHAR String ); +#define DEBUG_MSG_BUFFER_SIZE 512 + extern "C" VOID _cdecl @@ -10741,18 +10770,24 @@ ) { int len; - UCHAR dbg_print_tmp_buff[512]; + UCHAR dbg_print_tmp_buff[DEBUG_MSG_BUFFER_SIZE]; // UNICODE_STRING msgBuff; va_list ap; va_start(ap, DebugMessage); - len = _vsnprintf((PCHAR)&dbg_print_tmp_buff[0], 511, DebugMessage, ap); - - dbg_print_tmp_buff[511] = 0; - - KdPrint(((PCHAR)&(dbg_print_tmp_buff[0]))); + len = _vsnprintf((PCHAR)&dbg_print_tmp_buff[0], DEBUG_MSG_BUFFER_SIZE-1, DebugMessage, ap); + + dbg_print_tmp_buff[DEBUG_MSG_BUFFER_SIZE-1] = 0; + + //DbgPrint(((PCHAR)&(dbg_print_tmp_buff[0]))); // already done in KdPrint macro HalDisplayString(dbg_print_tmp_buff); +#ifdef _DEBUG + if(g_LogToDisplay > 1) { + AtapiStallExecution(g_LogToDisplay*1000); + } +#endif // _DEBUG + va_end(ap); } // end PrintNtConsole() Modified: trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_dma.cpp [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -1012,7 +1012,7 @@ /****************/ KdPrint2((PRINT_PREFIX "SATA Generic\n")); - if((udmamode >= 5) || (ChipFlags & UNIATA_AHCI) || (chan->MaxTransferMode >= ATA_SA150)) { + if((udmamode >= 5) || (ChipFlags & UNIATA_AHCI) || ((udmamode >= 0) && (chan->MaxTransferMode >= ATA_SA150))) { /* some drives report UDMA6, some UDMA5 */ /* ATAPI may not have SataCapabilities set in IDENTIFY DATA */ if(ata_is_sata(&(LunExt->IdentifyData))) { Modified: trunk/reactos/drivers/storage/ide/uniata/id_init.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_init.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_init.cpp [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -1085,7 +1085,7 @@ KdPrint2((PRINT_PREFIX "PATA part\n")); } else { - if(/*(ChipFlags & ICH5) &&*/ BaseMemAddress) { + if(!(ChipFlags & ICH7) && BaseMemAddress) { KdPrint2((PRINT_PREFIX "BaseMemAddress[5] -> indexed\n")); chan->RegTranslation[IDX_INDEXED_ADDR].Addr = BaseMemAddress + 0; chan->RegTranslation[IDX_INDEXED_ADDR].MemIo = MemIo; @@ -1094,17 +1094,20 @@ } if((ChipFlags & ICH5) || BaseMemAddress) { - KdPrint2((PRINT_PREFIX "io indexed\n")); + KdPrint2((PRINT_PREFIX "io proc()\n")); // Rather interesting way of register access... ChipType = INTEL_IDX; deviceExtension->HwFlags &= ~CHIPTYPE_MASK; deviceExtension->HwFlags |= ChipType; - chan->RegTranslation[IDX_SATA_SStatus].Addr = 0x200*c + 0; + if(ChipFlags & ICH7) { + KdPrint2((PRINT_PREFIX "ICH7 way\n")); + } + chan->RegTranslation[IDX_SATA_SStatus].Addr = 0x200*c + 0; // this is fake non-zero value chan->RegTranslation[IDX_SATA_SStatus].Proc = 1; - chan->RegTranslation[IDX_SATA_SError].Addr = 0x200*c + 2; + chan->RegTranslation[IDX_SATA_SError].Addr = 0x200*c + 2; // this is fake non-zero value chan->RegTranslation[IDX_SATA_SError].Proc = 1; - chan->RegTranslation[IDX_SATA_SControl].Addr = 0x200*c + 1; + chan->RegTranslation[IDX_SATA_SControl].Addr = 0x200*c + 1; // this is fake non-zero value chan->RegTranslation[IDX_SATA_SControl].Proc = 1; } } @@ -1835,7 +1838,7 @@ ChangePciConfig4(0x94, (a | (1 << 9))); /* Set Ports Implemented register bits. */ AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x0c, - AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x0c) | 0xff); + AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), 0x0c) | 0x0f); } /* enable PCI interrupt */ ChangePciConfig2(offsetof(PCI_COMMON_CONFIG, Command), (a & ~0x0400)); @@ -1883,24 +1886,29 @@ KdPrint2((PRINT_PREFIX "other Intel\n")); switch(tmp8 & 0x03) { case 0: + KdPrint2((PRINT_PREFIX "0 -> %d/%d\n", 0+c, 2+c)); chan->lun[0]->SATA_lun_map = 0+c; chan->lun[1]->SATA_lun_map = 2+c; break; case 2: if(c==0) { + KdPrint2((PRINT_PREFIX "2 -> %d/%d\n", 0, 2)); chan->lun[0]->SATA_lun_map = 0; chan->lun[1]->SATA_lun_map = 2; } else { // PATA + KdPrint2((PRINT_PREFIX "PATA\n")); IsPata = TRUE; } break; case 1: if(c==1) { + KdPrint2((PRINT_PREFIX "2 -> %d/%d\n", 1, 3)); chan->lun[0]->SATA_lun_map = 1; chan->lun[1]->SATA_lun_map = 3; } else { // PATA + KdPrint2((PRINT_PREFIX "PATA\n")); IsPata = TRUE; } break; Modified: trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_probe.cpp [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -93,11 +93,15 @@ { ULONG i; ULONG busDataRead; + USHORT CmdOrig; // Enable Busmastering, IO-space and Mem-space + // Note: write to CONFIG *may* cause controller to interrupt (not handled yet) + // even if no bits are updated. Was observed on ICH7 KdPrint2((PRINT_PREFIX "Enabling Mem/Io spaces and busmastering...\n")); KdPrint2((PRINT_PREFIX "Initial pciData.Command = %#x\n", pciData->Command)); for(i=0; i<3; i++) { + CmdOrig = pciData->Command; switch(i) { case 0: KdPrint2((PRINT_PREFIX "PCI_ENABLE_IO_SPACE\n")); @@ -112,17 +116,20 @@ pciData->Command |= PCI_ENABLE_BUS_MASTER; break; } + if(CmdOrig == pciData->Command) { + continue; + } HalSetBusDataByOffset( PCIConfiguration, busNumber, slotNumber, &(pciData->Command), offsetof(PCI_COMMON_CONFIG, Command), sizeof(pciData->Command)); - KdPrint2((PRINT_PREFIX "InterruptLine = %#x\n", pciData->u.type0.InterruptLine)); // reread config space busDataRead = HalGetBusData(PCIConfiguration, busNumber, slotNumber, pciData, PCI_COMMON_HDR_LENGTH); KdPrint2((PRINT_PREFIX "New pciData.Command = %#x\n", pciData->Command)); } + KdPrint2((PRINT_PREFIX "InterruptLine = %#x\n", pciData->u.type0.InterruptLine)); KdPrint2((PRINT_PREFIX "Final pciData.Command = %#x\n", pciData->Command)); return pciData->Command; } // end UniataEnableIoPCI() @@ -1635,7 +1642,7 @@ AtapiStallExecution(10); GetBaseStatus(chan, statusByte); skip_find_dev = FALSE; - if(!(deviceExtension->HwFlags & UNIATA_NO_SLAVE)) { + if(!(deviceExtension->HwFlags & UNIATA_NO_SLAVE) && (deviceExtension->NumberLuns > 1)) { if ((statusByte & 0xf8) == 0xf8 || (statusByte == 0xa5)) { // Check slave. @@ -1668,6 +1675,32 @@ } //#ifdef UNIATA_INIT_ON_PROBE // } +#else //UNIATA_INIT_ON_PROBE + KdPrint2((PRINT_PREFIX "clean IDE intr 0\n")); + + SelectDrive(chan, 0); + AtapiStallExecution(10); + GetBaseStatus(chan, statusByte); + + if(!(deviceExtension->HwFlags & UNIATA_NO_SLAVE) && (deviceExtension->NumberLuns > 1)) { + KdPrint2((PRINT_PREFIX "clean IDE intr 1\n")); + + SelectDrive(chan, 1); + AtapiStallExecution(1); + GetBaseStatus(chan, statusByte); + + SelectDrive(chan, 0); + } + + statusByte = GetDmaStatus(deviceExtension, c); + KdPrint2((PRINT_PREFIX " DMA status %#x\n", statusByte)); + if(statusByte & BM_STATUS_INTR) { + // bullshit, we have DMA interrupt, but had never initiate DMA operation + KdPrint2((PRINT_PREFIX " clear unexpected DMA intr\n")); + AtapiDmaDone(deviceExtension, 0, c, NULL); + GetBaseStatus(chan, statusByte); + } + #endif //UNIATA_INIT_ON_PROBE } found = TRUE; Modified: trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/id_sata.cpp [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -302,6 +302,24 @@ SetPciConfig4(0xa0, offs); GetPciConfig4(0xa4, offs); return offs; + } else + if(deviceExtension->HwFlags & ICH7) { + offs = 0x100+chan->lun[p]->SATA_lun_map*0x80; + KdPrint3((PRINT_PREFIX " ICH7 way, offs %#x\n", offs)); + switch(io_port_ndx) { + case IDX_SATA_SStatus: + offs += IDX_AHCI_P_SStatus; + break; + case IDX_SATA_SError: + offs += IDX_AHCI_P_SError; + break; + case IDX_SATA_SControl: + offs += IDX_AHCI_P_SControl; + break; + default: + return -1; + } + return AtapiReadPortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), offs); } else { offs = ((deviceExtension->Channel+chan->lChannel)*2+p) * 0x100; KdPrint3((PRINT_PREFIX " def way, offs %#x\n", offs)); @@ -371,6 +389,25 @@ } SetPciConfig4(0xa0, offs); SetPciConfig4(0xa4, data); + return; + } else + if(deviceExtension->HwFlags & ICH7) { + offs = 0x100+chan->lun[p]->SATA_lun_map*0x80; + KdPrint3((PRINT_PREFIX " ICH7 way, offs %#x\n", offs)); + switch(io_port_ndx) { + case IDX_SATA_SStatus: + offs += IDX_AHCI_P_SStatus; + break; + case IDX_SATA_SError: + offs += IDX_AHCI_P_SError; + break; + case IDX_SATA_SControl: + offs += IDX_AHCI_P_SControl; + break; + default: + return; + } + AtapiWritePortEx4(NULL, (ULONGIO_PTR)(&deviceExtension->BaseIoAddressSATA_0), offs, data); return; } else { offs = ((deviceExtension->Channel+chan->lChannel)*2+p) * 0x100; Modified: trunk/reactos/drivers/storage/ide/uniata/scsi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/scsi.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/scsi.h [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -1100,9 +1100,14 @@ UCHAR Wide16Bit : 1; UCHAR Wide32Bit : 1; UCHAR RelativeAddressing : 1; - UCHAR VendorId[8]; - UCHAR ProductId[16]; - UCHAR ProductRevisionLevel[4]; + union { + UCHAR DeviceIdentificationString[28]; + struct { + UCHAR VendorId[8]; + UCHAR ProductId[16]; + UCHAR ProductRevisionLevel[4]; + }; + }; UCHAR VendorSpecific[20]; UCHAR Reserved3[40]; } INQUIRYDATA, *PINQUIRYDATA; Modified: trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/ide/uniata…
============================================================================== --- trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/ide/uniata/uniata_ver.h [iso-8859-1] Tue Oct 9 21:02:00 2012 @@ -1,10 +1,10 @@ -#define UNIATA_VER_STR "43f5" -#define UNIATA_VER_DOT 0.43.6.5 +#define UNIATA_VER_STR "44b1" +#define UNIATA_VER_DOT 0.44.2.1 #define UNIATA_VER_MJ 0 -#define UNIATA_VER_MN 43 -#define UNIATA_VER_SUB_MJ 6 -#define UNIATA_VER_SUB_MN 5 -#define UNIATA_VER_DOT_COMMA 0,43,6,5 -#define UNIATA_VER_DOT_STR "0.43.6.5" +#define UNIATA_VER_MN 44 +#define UNIATA_VER_SUB_MJ 2 +#define UNIATA_VER_SUB_MN 1 +#define UNIATA_VER_DOT_COMMA 0,44,2,1 +#define UNIATA_VER_DOT_STR "0.44.2.1" #define UNIATA_VER_YEAR 2012 #define UNIATA_VER_YEAR_STR "2012"
12 years, 2 months
1
0
0
0
[hbelusca] 57524: [MSVCRT:APITEST] - Add a test which allows testing the command line argument lpCmdLine in WinMain function (GUI programs).
by hbelusca@svn.reactos.org
Author: hbelusca Date: Tue Oct 9 20:56:11 2012 New Revision: 57524 URL:
http://svn.reactos.org/svn/reactos?rev=57524&view=rev
Log: [MSVCRT:APITEST] - Add a test which allows testing the command line argument lpCmdLine in WinMain function (GUI programs). Added: trunk/rostests/apitests/msvcrt/CommandLine.c (with props) trunk/rostests/apitests/msvcrt/cmdline_util/ (with props) trunk/rostests/apitests/msvcrt/cmdline_util/CMakeLists.txt (with props) trunk/rostests/apitests/msvcrt/cmdline_util/cmdline_util.c (with props) Modified: trunk/rostests/apitests/msvcrt/CMakeLists.txt trunk/rostests/apitests/msvcrt/testlist.c Modified: trunk/rostests/apitests/msvcrt/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CMakeList…
============================================================================== --- trunk/rostests/apitests/msvcrt/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/CMakeLists.txt [iso-8859-1] Tue Oct 9 20:56:11 2012 @@ -1,7 +1,10 @@ + +add_subdirectory(cmdline_util) add_definitions(-D_DLL -D__USE_CRTIMP) list(APPEND SOURCE + CommandLine.c ieee.c splitpath.c testlist.c) Added: trunk/rostests/apitests/msvcrt/CommandLine.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/CommandLi…
============================================================================== --- trunk/rostests/apitests/msvcrt/CommandLine.c (added) +++ trunk/rostests/apitests/msvcrt/CommandLine.c [iso-8859-1] Tue Oct 9 20:56:11 2012 @@ -1,0 +1,280 @@ +/* + * PROJECT: ReactOS API Tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for CRT command-line handling. + * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> + */ + +#define WIN32_NO_STATUS +#define UNICODE +#include <stdio.h> +#include <wine/test.h> +#include <ndk/ntndk.h> + +#define COUNT_OF(x) (sizeof((x))/sizeof((x)[0])) + +/* + * The path to the data file is hardcoded in cmdline_util.c + * Please synchronize it whenever you do a change. + */ +#define DATAFILE L"C:\\cmdline.dat" + +/** + * Extracts the command tail from the command line + * (deletes the program's name and keep the rest). + **/ +#define SPACECHAR L' ' +#define DQUOTECHAR L'\"' + +LPWSTR ExtractCmdLine(IN LPWSTR lpszCommandLine) +{ + BOOL inDoubleQuote = FALSE; + + /* + * Skip the program's name (the first token in the command line). + * Handle quoted program's name. + */ + if (lpszCommandLine) + { + while ( (*lpszCommandLine > SPACECHAR) || + (*lpszCommandLine && inDoubleQuote) ) + { + if (*lpszCommandLine == DQUOTECHAR) + inDoubleQuote = !inDoubleQuote; + + ++lpszCommandLine; + } + + /* Skip all white spaces preceeding the second token. */ + while (*lpszCommandLine && (*lpszCommandLine <= SPACECHAR)) + ++lpszCommandLine; + } + + return lpszCommandLine; +} + +VOID ExtractCmdLine_U(IN OUT PUNICODE_STRING pCommandLine_U) +{ + BOOL inDoubleQuote = FALSE; + PWSTR lpszCommandLine; + + /* + * Skip the program's name (the first token in the command line). + * Handle quoted program's name. + */ + if (pCommandLine_U && pCommandLine_U->Buffer && (pCommandLine_U->Length != 0)) + { + lpszCommandLine = pCommandLine_U->Buffer; + + while ( (pCommandLine_U->Length > 0) && + ( (*lpszCommandLine > SPACECHAR) || + (*lpszCommandLine && inDoubleQuote) ) ) + { + if (*lpszCommandLine == DQUOTECHAR) + inDoubleQuote = !inDoubleQuote; + + ++lpszCommandLine; + pCommandLine_U->Length -= sizeof(WCHAR); + } + + /* Skip all white spaces preceeding the second token. */ + while ((pCommandLine_U->Length > 0) && *lpszCommandLine && (*lpszCommandLine <= SPACECHAR)) + { + ++lpszCommandLine; + pCommandLine_U->Length -= sizeof(WCHAR); + } + + pCommandLine_U->Buffer = lpszCommandLine; + } + + return; +} + + +typedef struct _TEST_CASE +{ + LPWSTR CmdLine; +} TEST_CASE, *PTEST_CASE; + +static TEST_CASE TestCases[] = +{ + {L"cmdline_util.exe"}, + {L"cmdline_util.exe foo bar"}, + {L"cmdline_util.exe \"foo bar\""}, + {L"cmdline_util.exe foo \"bar John\" Doe"}, + + {L"\"cmdline_util.exe\""}, + {L"\"cmdline_util.exe\" foo bar"}, + {L"\"cmdline_util.exe\" \"foo bar\""}, + {L"\"cmdline_util.exe\" foo \"bar John\" Doe"}, + + {L"\"cmdline_util.exe\""}, + {L"\"cmdline_util.exe \"foo bar\"\""}, +}; + +static void Test_CommandLine(IN ULONG TestNumber, + IN PTEST_CASE TestCase) +{ + BOOL bRet; + + WCHAR CmdLine[MAX_PATH]; + STARTUPINFOW si; + PROCESS_INFORMATION pi; + + ZeroMemory(&si, sizeof(si)); + ZeroMemory(&pi, sizeof(pi)); + si.cb = sizeof(si); + + wcscpy(CmdLine, TestCase->CmdLine); + + /* + * Launch the utility program and wait till it's terminated. + */ + bRet = CreateProcessW(NULL, + CmdLine, + NULL, NULL, + FALSE, + CREATE_UNICODE_ENVIRONMENT, + NULL, NULL, + &si, &pi); + ok(bRet, "Test %lu - Failed to launch ' %S ', error = %lu.\n", TestNumber, TestCase->CmdLine, GetLastError()); + + if (bRet) + { + /* Wait until child process exits. */ + WaitForSingleObject(pi.hProcess, INFINITE); + + /* Close process and thread handles. */ + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); + } + + /* + * Analyses the result. + */ + { + /* Open the data file. */ + HANDLE hFile = CreateFileW(DATAFILE, + GENERIC_READ, + 0, NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + ok(hFile != INVALID_HANDLE_VALUE, "Test %lu - Failed to open the data file 'C:\\cmdline.dat', error = %lu.\n", TestNumber, GetLastError()); + + if (hFile != INVALID_HANDLE_VALUE) + { + WCHAR BuffWinMain[MAX_PATH]; LPWSTR WinMainCmdLine = BuffWinMain; + WCHAR BuffWin32[MAX_PATH] ; LPWSTR Win32CmdLine = BuffWin32 ; + WCHAR BuffNT[0xffff /* Maximum USHORT size */]; + UNICODE_STRING NTCmdLine; + + DWORD dwSize, dwStringSize; + + /* + * Format of the data file : + * + * [size_of_string 4 bytes][null_terminated_C_string] + * [size_of_string 4 bytes][null_terminated_C_string] + * [UNICODE_STRING_structure][string_buffer_of_UNICODE_STRING] + */ + + /* 1- Read the WinMain's command line. */ + dwStringSize = 0; + + ReadFile(hFile, + &dwStringSize, + sizeof(dwStringSize), + &dwSize, + NULL); + + dwStringSize = min(dwStringSize, sizeof(BuffWinMain)); + ReadFile(hFile, + WinMainCmdLine, + dwStringSize, + &dwSize, + NULL); + *(LPWSTR)((ULONG_PTR)WinMainCmdLine + dwStringSize) = 0; + + /* 2- Read the Win32 mode command line. */ + dwStringSize = 0; + + ReadFile(hFile, + &dwStringSize, + sizeof(dwStringSize), + &dwSize, + NULL); + + dwStringSize = min(dwStringSize, sizeof(BuffWin32)); + ReadFile(hFile, + Win32CmdLine, + dwStringSize, + &dwSize, + NULL); + *(LPWSTR)((ULONG_PTR)Win32CmdLine + dwStringSize) = 0; + + /* 3- Finally, read the UNICODE_STRING command line. */ + ReadFile(hFile, + &NTCmdLine, + sizeof(NTCmdLine), + &dwSize, + NULL); + + NTCmdLine.Buffer = BuffNT; + ReadFile(hFile, + NTCmdLine.Buffer, + NTCmdLine.Length, + &dwSize, + NULL); + + /* Now close the file. */ + CloseHandle(hFile); + + /* + * Remove the program's name in the Win32 and NT command lines. + */ + Win32CmdLine = ExtractCmdLine(Win32CmdLine); + ExtractCmdLine_U(&NTCmdLine); + + /* Print the results */ + *(LPWSTR)((ULONG_PTR)NTCmdLine.Buffer + NTCmdLine.Length) = 0; + printf("WinMain cmdline = '%S'\n" + "Win32 cmdline = '%S'\n" + "NT cmdline = '%S'\n" + "NT length = %u\n", + WinMainCmdLine, + Win32CmdLine, + NTCmdLine.Buffer, NTCmdLine.Length); + + /* + * Now check the results. + */ + dwStringSize = min(wcslen(WinMainCmdLine), wcslen(Win32CmdLine)); + ok(wcslen(WinMainCmdLine) == wcslen(Win32CmdLine), "Test %lu - WinMain and Win32 command lines do not have the same length !\n", TestNumber); + ok(wcsncmp(WinMainCmdLine, Win32CmdLine, dwStringSize) == 0, "Test %lu - WinMain and Win32 command lines are different !\n", TestNumber); + + dwStringSize = min(wcslen(WinMainCmdLine), NTCmdLine.Length / sizeof(WCHAR)); + ok(wcsncmp(WinMainCmdLine, NTCmdLine.Buffer, dwStringSize) == 0, "Test %lu - WinMain and NT command lines are different !\n", TestNumber); + + dwStringSize = min(wcslen(Win32CmdLine), NTCmdLine.Length / sizeof(WCHAR)); + ok(wcsncmp(Win32CmdLine, NTCmdLine.Buffer, dwStringSize) == 0, "Test %lu - Win32 and NT command lines are different !\n", TestNumber); + } + } + + /* + * Always delete the data file. + */ + DeleteFileW(DATAFILE); +} + +START_TEST(CommandLine) +{ + ULONG i; + + for (i = 0 ; i < COUNT_OF(TestCases) ; ++i) + { + Test_CommandLine(i, &TestCases[i]); + } +} + +/* EOF */ Propchange: trunk/rostests/apitests/msvcrt/CommandLine.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/apitests/msvcrt/cmdline_util/ ------------------------------------------------------------------------------ --- bugtraq:logregex (added) +++ bugtraq:logregex Tue Oct 9 20:56:11 2012 @@ -1,0 +1,2 @@ +([Ii]ssue|[Bb]ug)s? #?(\d+)(,? ?#?(\d+))*(,? ?(and |or )?#?(\d+))? +(\d+) Propchange: trunk/rostests/apitests/msvcrt/cmdline_util/ ------------------------------------------------------------------------------ bugtraq:message = See issue #%BUGID% for more details. Propchange: trunk/rostests/apitests/msvcrt/cmdline_util/ ------------------------------------------------------------------------------ bugtraq:url =
http://www.reactos.org/bugzilla/show_bug.cgi?id=%BUGID%
Propchange: trunk/rostests/apitests/msvcrt/cmdline_util/ ------------------------------------------------------------------------------ tsvn:logminsize = 10 Added: trunk/rostests/apitests/msvcrt/cmdline_util/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/cmdline_u…
============================================================================== --- trunk/rostests/apitests/msvcrt/cmdline_util/CMakeLists.txt (added) +++ trunk/rostests/apitests/msvcrt/cmdline_util/CMakeLists.txt [iso-8859-1] Tue Oct 9 20:56:11 2012 @@ -1,0 +1,10 @@ + +add_definitions(-D_DLL -D__USE_CRTIMP) + +list(APPEND SOURCE + cmdline_util.c) + +add_executable(cmdline_util ${SOURCE}) +set_module_type(cmdline_util win32gui UNICODE) +add_importlibs(cmdline_util msvcrt kernel32 ntdll) +add_cd_file(TARGET cmdline_util DESTINATION reactos/bin FOR all) Propchange: trunk/rostests/apitests/msvcrt/cmdline_util/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/apitests/msvcrt/cmdline_util/cmdline_util.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/cmdline_u…
============================================================================== --- trunk/rostests/apitests/msvcrt/cmdline_util/cmdline_util.c (added) +++ trunk/rostests/apitests/msvcrt/cmdline_util/cmdline_util.c [iso-8859-1] Tue Oct 9 20:56:11 2012 @@ -1,0 +1,94 @@ +/* + * PROJECT: ReactOS API Tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for CRT command-line handling - Utility GUI program. + * PROGRAMMER: Hermès BÉLUSCA - MAÏTO <hermes.belusca(a)sfr.fr> + */ + +#define WIN32_NO_STATUS +#include <stdio.h> +#include <windows.h> +#include <ndk/ntndk.h> + +int APIENTRY wWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPWSTR lpCmdLine, + int nCmdShow) +{ + /* + * Get the unparsed command line as seen in Win32 mode, + * and the NT-native mode one. + */ + LPWSTR CmdLine = GetCommandLineW(); + UNICODE_STRING CmdLine_U = NtCurrentPeb()->ProcessParameters->CommandLine; + + /* Write the results into a file. */ + HANDLE hFile = CreateFileW(L"C:\\cmdline.dat", + GENERIC_WRITE, + 0, NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); + if (hFile != INVALID_HANDLE_VALUE) + { + DWORD dwSize, dwStringSize; + + /* + * Format of the data file : + * + * [size_of_string 4 bytes][null_terminated_C_string] + * [size_of_string 4 bytes][null_terminated_C_string] + * [UNICODE_STRING_structure][string_buffer_of_UNICODE_STRING] + */ + + /* 1- Write the WinMain's command line. */ + dwStringSize = (wcslen(lpCmdLine) + 1) * sizeof(WCHAR); + + WriteFile(hFile, + &dwStringSize, + sizeof(dwStringSize), + &dwSize, + NULL); + + WriteFile(hFile, + lpCmdLine, + dwStringSize, + &dwSize, + NULL); + + /* 2- Write the Win32 mode command line. */ + dwStringSize = (wcslen(CmdLine) + 1) * sizeof(WCHAR); + + WriteFile(hFile, + &dwStringSize, + sizeof(dwStringSize), + &dwSize, + NULL); + + WriteFile(hFile, + CmdLine, + dwStringSize, + &dwSize, + NULL); + + /* 3- Finally, write the UNICODE_STRING command line. */ + WriteFile(hFile, + &CmdLine_U, + sizeof(CmdLine_U), + &dwSize, + NULL); + + WriteFile(hFile, + CmdLine_U.Buffer, + CmdLine_U.Length, + &dwSize, + NULL); + + /* Now close the file. */ + CloseHandle(hFile); + } + + return 0; +} + +/* EOF */ Propchange: trunk/rostests/apitests/msvcrt/cmdline_util/cmdline_util.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/msvcrt/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/msvcrt/testlist.…
============================================================================== --- trunk/rostests/apitests/msvcrt/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/msvcrt/testlist.c [iso-8859-1] Tue Oct 9 20:56:11 2012 @@ -5,14 +5,15 @@ #define STANDALONE #include "wine/test.h" +extern void func_CommandLine(void); extern void func_ieee(void); extern void func_splitpath(void); const struct test winetest_testlist[] = { + { "CommandLine", func_CommandLine }, { "ieee", func_ieee }, { "splitpath", func_splitpath }, { 0, 0 } }; -
12 years, 2 months
1
0
0
0
[akhaldi] 57523: [RASAPI32] CORE-6731 * Export RasGetLinkStatistics (as a stub).
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Oct 9 18:58:10 2012 New Revision: 57523 URL:
http://svn.reactos.org/svn/reactos?rev=57523&view=rev
Log: [RASAPI32] CORE-6731 * Export RasGetLinkStatistics (as a stub). Modified: trunk/reactos/dll/win32/rasapi32/rasapi32.spec Modified: trunk/reactos/dll/win32/rasapi32/rasapi32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/rasapi32/rasapi3…
============================================================================== --- trunk/reactos/dll/win32/rasapi32/rasapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/rasapi32/rasapi32.spec [iso-8859-1] Tue Oct 9 18:58:10 2012 @@ -47,6 +47,7 @@ @ stub RasGetHport @ stdcall RasGetProjectionInfoA(ptr ptr ptr ptr) @ stdcall RasGetProjectionInfoW(ptr ptr ptr ptr) +@ stub RasGetLinkStatistics @ stub RasGetSubEntryHandleA @ stub RasGetSubEntryHandleW @ stub RasGetSubEntryPropertiesA
12 years, 2 months
1
0
0
0
[ekohl] 57522: [SAMSRV] Make the SamIFree routines clean-up properly.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Oct 8 22:48:08 2012 New Revision: 57522 URL:
http://svn.reactos.org/svn/reactos?rev=57522&view=rev
Log: [SAMSRV] Make the SamIFree routines clean-up properly. Modified: trunk/reactos/dll/win32/samsrv/samsrv.c Modified: trunk/reactos/dll/win32/samsrv/samsrv.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/samsrv/samsrv.c?…
============================================================================== --- trunk/reactos/dll/win32/samsrv/samsrv.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/samsrv/samsrv.c [iso-8859-1] Mon Oct 8 22:48:08 2012 @@ -81,6 +81,8 @@ } MIDL_user_free(Ptr->Element); + Ptr->Element = NULL; + Ptr->Count = 0; } } } @@ -93,7 +95,11 @@ if (Ptr != NULL) { if (Ptr->Element != NULL) + { MIDL_user_free(Ptr->Element); + Ptr->Element = NULL; + Ptr->Count = 0; + } } }
12 years, 2 months
1
0
0
0
[ekohl] 57521: [LSASRV] Don't stop searching if a name or SID could not be mapped yet.
by ekohl@svn.reactos.org
Author: ekohl Date: Mon Oct 8 22:45:47 2012 New Revision: 57521 URL:
http://svn.reactos.org/svn/reactos?rev=57521&view=rev
Log: [LSASRV] Don't stop searching if a name or SID could not be mapped yet. Modified: trunk/reactos/dll/win32/lsasrv/sids.c Modified: trunk/reactos/dll/win32/lsasrv/sids.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/sids.c?re…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/sids.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/sids.c [iso-8859-1] Mon Oct 8 22:45:47 2012 @@ -1104,6 +1104,8 @@ if (DomainNames[i].Length != 0) continue; + TRACE("Mapping name: %wZ\n", &AccountNames[i]); + Status = SamrLookupNamesInDomain(DomainHandle, 1, &AccountNames[i], @@ -1111,6 +1113,8 @@ &Use); if (NT_SUCCESS(Status)) { + TRACE("Found relative ID: %lu\n", RelativeIds.Element[0]); + SidsBuffer[i].Use = Use.Element[0]; SidsBuffer[i].Sid = CreateSidFromSidAndRid(BuiltinDomainSid, RelativeIds.Element[0]); @@ -1507,7 +1511,9 @@ DomainsBuffer, SidsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == Count) @@ -1520,7 +1526,9 @@ DomainsBuffer, SidsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == Count) @@ -1533,7 +1541,9 @@ DomainsBuffer, SidsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == Count) @@ -1547,7 +1557,9 @@ DomainsBuffer, SidsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == Count) @@ -1560,7 +1572,9 @@ DomainsBuffer, SidsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == Count) @@ -1768,7 +1782,6 @@ TRACE("Mapped to: %wZ\n", &NamesBuffer[i].Name); (*Mapped)++; - continue; } else if (LsapIsPrefixSid(BuiltinDomainSid, SidEnumBuffer->SidInfo[i].Sid)) { @@ -1781,45 +1794,43 @@ RelativeIds, &Names, &Use); - if (!NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { - TRACE("SamLookupIdsInDomain failed (Status %08lx)\n", Status); - goto done; - } - - NamesBuffer[i].Use = Use.Element[0]; - NamesBuffer[i].Flags = 0; - - NamesBuffer[i].Name.Length = Names.Element[0].Length; - NamesBuffer[i].Name.MaximumLength = Names.Element[0].MaximumLength; - NamesBuffer[i].Name.Buffer = MIDL_user_allocate(Names.Element[0].MaximumLength); - if (NamesBuffer[i].Name.Buffer == NULL) - { + NamesBuffer[i].Use = Use.Element[0]; + NamesBuffer[i].Flags = 0; + + NamesBuffer[i].Name.Length = Names.Element[0].Length; + NamesBuffer[i].Name.MaximumLength = Names.Element[0].MaximumLength; + NamesBuffer[i].Name.Buffer = MIDL_user_allocate(Names.Element[0].MaximumLength); + if (NamesBuffer[i].Name.Buffer == NULL) + { + SamIFree_SAMPR_RETURNED_USTRING_ARRAY(&Names); + SamIFree_SAMPR_ULONG_ARRAY(&Use); + + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + RtlCopyMemory(NamesBuffer[i].Name.Buffer, + Names.Element[0].Buffer, + Names.Element[0].MaximumLength); + SamIFree_SAMPR_RETURNED_USTRING_ARRAY(&Names); SamIFree_SAMPR_ULONG_ARRAY(&Use); - Status = STATUS_INSUFFICIENT_RESOURCES; - goto done; + Status = LsapAddDomainToDomainsList(DomainsBuffer, + &BuiltinDomainName, + BuiltinDomainSid, + &DomainIndex); + if (!NT_SUCCESS(Status)) + goto done; + + NamesBuffer[i].DomainIndex = DomainIndex; + + TRACE("Mapped to: %wZ\n", &NamesBuffer[i].Name); + + (*Mapped)++; } - - RtlCopyMemory(NamesBuffer[i].Name.Buffer, Names.Element[0].Buffer, Names.Element[0].MaximumLength); - - SamIFree_SAMPR_RETURNED_USTRING_ARRAY(&Names); - SamIFree_SAMPR_ULONG_ARRAY(&Use); - - Status = LsapAddDomainToDomainsList(DomainsBuffer, - &BuiltinDomainName, - BuiltinDomainSid, - &DomainIndex); - if (!NT_SUCCESS(Status)) - goto done; - - NamesBuffer[i].DomainIndex = DomainIndex; - - TRACE("Mapped to: %wZ\n", &NamesBuffer[i].Name); - - (*Mapped)++; - continue; } } @@ -1910,7 +1921,6 @@ TRACE("Mapped to: %wZ\n", &NamesBuffer[i].Name); (*Mapped)++; - continue; } else if (LsapIsPrefixSid(AccountDomainSid, SidEnumBuffer->SidInfo[i].Sid)) { @@ -1923,45 +1933,43 @@ RelativeIds, &Names, &Use); - if (!NT_SUCCESS(Status)) + if (NT_SUCCESS(Status)) { - TRACE("SamLookupIdsInDomain failed (Status %08lx)\n", Status); - goto done; - } - - NamesBuffer[i].Use = Use.Element[0]; - NamesBuffer[i].Flags = 0; - - NamesBuffer[i].Name.Length = Names.Element[0].Length; - NamesBuffer[i].Name.MaximumLength = Names.Element[0].MaximumLength; - NamesBuffer[i].Name.Buffer = MIDL_user_allocate(Names.Element[0].MaximumLength); - if (NamesBuffer[i].Name.Buffer == NULL) - { + NamesBuffer[i].Use = Use.Element[0]; + NamesBuffer[i].Flags = 0; + + NamesBuffer[i].Name.Length = Names.Element[0].Length; + NamesBuffer[i].Name.MaximumLength = Names.Element[0].MaximumLength; + NamesBuffer[i].Name.Buffer = MIDL_user_allocate(Names.Element[0].MaximumLength); + if (NamesBuffer[i].Name.Buffer == NULL) + { + SamIFree_SAMPR_RETURNED_USTRING_ARRAY(&Names); + SamIFree_SAMPR_ULONG_ARRAY(&Use); + + Status = STATUS_INSUFFICIENT_RESOURCES; + goto done; + } + + RtlCopyMemory(NamesBuffer[i].Name.Buffer, + Names.Element[0].Buffer, + Names.Element[0].MaximumLength); + SamIFree_SAMPR_RETURNED_USTRING_ARRAY(&Names); SamIFree_SAMPR_ULONG_ARRAY(&Use); - Status = STATUS_INSUFFICIENT_RESOURCES; - goto done; + Status = LsapAddDomainToDomainsList(DomainsBuffer, + &AccountDomainName, + AccountDomainSid, + &DomainIndex); + if (!NT_SUCCESS(Status)) + goto done; + + NamesBuffer[i].DomainIndex = DomainIndex; + + TRACE("Mapped to: %wZ\n", &NamesBuffer[i].Name); + + (*Mapped)++; } - - RtlCopyMemory(NamesBuffer[i].Name.Buffer, Names.Element[0].Buffer, Names.Element[0].MaximumLength); - - SamIFree_SAMPR_RETURNED_USTRING_ARRAY(&Names); - SamIFree_SAMPR_ULONG_ARRAY(&Use); - - Status = LsapAddDomainToDomainsList(DomainsBuffer, - &AccountDomainName, - AccountDomainSid, - &DomainIndex); - if (!NT_SUCCESS(Status)) - goto done; - - NamesBuffer[i].DomainIndex = DomainIndex; - - TRACE("Mapped to: %wZ\n", &NamesBuffer[i].Name); - - (*Mapped)++; - continue; } } @@ -2109,7 +2117,9 @@ NamesBuffer, DomainsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == SidEnumBuffer->Entries) @@ -2120,7 +2130,9 @@ NamesBuffer, DomainsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == SidEnumBuffer->Entries) @@ -2131,7 +2143,9 @@ NamesBuffer, DomainsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; if (Mapped == SidEnumBuffer->Entries) @@ -2142,7 +2156,9 @@ NamesBuffer, DomainsBuffer, &Mapped); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) && + Status != STATUS_NONE_MAPPED && + Status != STATUS_SOME_NOT_MAPPED) goto done; done:
12 years, 2 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
22
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
Results per page:
10
25
50
100
200