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
February 2018
----- 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
24 participants
240 discussions
Start a n
N
ew thread
01/01: [SNDREC32] it-IT.rc: add a missing new line
by Giannis Adamopoulos
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=21ae3a0862415cbff1acc…
commit 21ae3a0862415cbff1accdf5efd208d37b3b339c Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org> AuthorDate: Mon Feb 19 02:03:35 2018 +0200 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Mon Feb 19 02:03:35 2018 +0200 [SNDREC32] it-IT.rc: add a missing new line --- base/applications/sndrec32/lang/it-IT.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/base/applications/sndrec32/lang/it-IT.rc b/base/applications/sndrec32/lang/it-IT.rc index c7278a3fc9..5c3f2e86e4 100644 --- a/base/applications/sndrec32/lang/it-IT.rc +++ b/base/applications/sndrec32/lang/it-IT.rc @@ -56,7 +56,8 @@ BEGIN MENUITEM "&Riproduce al contrario", ID_EFFECTS_REVERSE END POPUP "?" - BEGIN MENUITEM "Informazioni", ID_ABOUT + BEGIN + MENUITEM "Informazioni", ID_ABOUT END END
6 years, 10 months
1
0
0
0
01/01: [SHELL32] CFSFolder: Fix some tests for GetAttributesOf
by Giannis Adamopoulos
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=48d88a361766d38a9a8b1…
commit 48d88a361766d38a9a8b10dafeb9a57176ab455a Author: Giannis Adamopoulos <gadamopoulos(a)reactos.org> AuthorDate: Mon Feb 19 01:59:30 2018 +0200 Commit: Giannis Adamopoulos <gadamopoulos(a)reactos.org> CommitDate: Mon Feb 19 02:01:02 2018 +0200 [SHELL32] CFSFolder: Fix some tests for GetAttributesOf --- dll/win32/shell32/folders/CFSFolder.cpp | 48 +++++++-------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/dll/win32/shell32/folders/CFSFolder.cpp b/dll/win32/shell32/folders/CFSFolder.cpp index e6a7e75156..15039eac60 100644 --- a/dll/win32/shell32/folders/CFSFolder.cpp +++ b/dll/win32/shell32/folders/CFSFolder.cpp @@ -456,23 +456,6 @@ void SHELL32_GetCLSIDForDirectory(LPCWSTR pwszDir, CLSID* pclsidFolder) } } - -static const DWORD dwSupportedAttr= - SFGAO_CANCOPY | /*0x00000001 */ - SFGAO_CANMOVE | /*0x00000002 */ - SFGAO_CANLINK | /*0x00000004 */ - SFGAO_CANRENAME | /*0x00000010 */ - SFGAO_CANDELETE | /*0x00000020 */ - SFGAO_HASPROPSHEET | /*0x00000040 */ - SFGAO_DROPTARGET | /*0x00000100 */ - SFGAO_LINK | /*0x00010000 */ - SFGAO_READONLY | /*0x00040000 */ - SFGAO_HIDDEN | /*0x00080000 */ - SFGAO_FILESYSANCESTOR | /*0x10000000 */ - SFGAO_FOLDER | /*0x20000000 */ - SFGAO_FILESYSTEM | /*0x40000000 */ - SFGAO_HASSUBFOLDER; /*0x80000000 */ - HRESULT SHELL32_GetFSItemAttributes(IShellFolder * psf, LPCITEMIDLIST pidl, LPDWORD pdwAttributes) { DWORD dwFileAttributes, dwShellAttributes; @@ -484,42 +467,29 @@ HRESULT SHELL32_GetFSItemAttributes(IShellFolder * psf, LPCITEMIDLIST pidl, LPDW return S_OK; } - if (*pdwAttributes & ~dwSupportedAttr) - { - WARN ("attributes 0x%08x not implemented\n", (*pdwAttributes & ~dwSupportedAttr)); - *pdwAttributes &= dwSupportedAttr; - } - dwFileAttributes = _ILGetFileAttributes(pidl, NULL, 0); /* Set common attributes */ - dwShellAttributes = *pdwAttributes; - dwShellAttributes |= SFGAO_FILESYSTEM | SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANDELETE | - SFGAO_CANRENAME | SFGAO_CANLINK | SFGAO_CANMOVE | SFGAO_CANCOPY; + dwShellAttributes = SFGAO_CANCOPY | SFGAO_CANMOVE | SFGAO_CANLINK | SFGAO_CANRENAME | SFGAO_CANDELETE | + SFGAO_HASPROPSHEET | SFGAO_DROPTARGET | SFGAO_FILESYSTEM; if (dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) - { - dwShellAttributes |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR); - } + dwShellAttributes |= (SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR | SFGAO_STORAGEANCESTOR | SFGAO_STORAGE); else - dwShellAttributes &= ~(SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR); + dwShellAttributes |= SFGAO_STREAM; if (dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) dwShellAttributes |= SFGAO_HIDDEN; - else - dwShellAttributes &= ~SFGAO_HIDDEN; if (dwFileAttributes & FILE_ATTRIBUTE_READONLY) dwShellAttributes |= SFGAO_READONLY; - else - dwShellAttributes &= ~SFGAO_READONLY; if (SFGAO_LINK & *pdwAttributes) { char ext[MAX_PATH]; - if (!_ILGetExtension(pidl, ext, MAX_PATH) || lstrcmpiA(ext, "lnk")) - dwShellAttributes &= ~SFGAO_LINK; + if (_ILGetExtension(pidl, ext, MAX_PATH) && !lstrcmpiA(ext, "lnk")) + dwShellAttributes |= SFGAO_LINK; } if (SFGAO_HASSUBFOLDER & *pdwAttributes) @@ -530,13 +500,13 @@ HRESULT SHELL32_GetFSItemAttributes(IShellFolder * psf, LPCITEMIDLIST pidl, LPDW CComPtr<IEnumIDList> pEnumIL; if (SUCCEEDED(psf2->EnumObjects(0, SHCONTF_FOLDERS, &pEnumIL))) { - if (pEnumIL->Skip(1) != S_OK) - dwShellAttributes &= ~SFGAO_HASSUBFOLDER; + if (pEnumIL->Skip(1) == S_OK) + dwShellAttributes |= SFGAO_HASSUBFOLDER; } } } - *pdwAttributes &= dwShellAttributes; + *pdwAttributes = dwShellAttributes; TRACE ("-- 0x%08x\n", *pdwAttributes); return S_OK;
6 years, 10 months
1
0
0
0
01/01: [SERVICES] Update a drivers status properly
by Eric Kohl
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a8d256bf23cefe9e8d163…
commit a8d256bf23cefe9e8d163e1a6522928e63796a16 Author: Eric Kohl <eric.kohl(a)reactos.org> AuthorDate: Sun Feb 18 18:47:42 2018 +0100 Commit: Eric Kohl <eric.kohl(a)reactos.org> CommitDate: Mon Feb 19 00:14:58 2018 +0100 [SERVICES] Update a drivers status properly - ScmUnloadDriver: Handle failed unload properly. - ScmGetDriverStatus: A driver is running when its driver object was found. Otherwise it has been stopped. - ScmControlDriver: Check a drivers status before and after unloading. CORE-14317 --- base/system/services/driver.c | 91 +++++++++++++++++++++++++++++-------------- 1 file changed, 61 insertions(+), 30 deletions(-) diff --git a/base/system/services/driver.c b/base/system/services/driver.c index 819183e5c0..2293acd053 100644 --- a/base/system/services/driver.c +++ b/base/system/services/driver.c @@ -71,6 +71,7 @@ done: return RtlNtStatusToDosError(Status); } + static DWORD ScmUnloadDriver(PSERVICE lpService) @@ -79,6 +80,7 @@ ScmUnloadDriver(PSERVICE lpService) BOOLEAN WasPrivilegeEnabled = FALSE; PWSTR pszDriverPath; UNICODE_STRING DriverPath; + DWORD dwError; /* Build the driver path */ /* 52 = wcslen(L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\") */ @@ -107,10 +109,15 @@ ScmUnloadDriver(PSERVICE lpService) { /* We encountered a failure, exit properly */ DPRINT1("SERVICES: Cannot acquire driver-unloading privilege, Status = 0x%08lx\n", Status); + dwError = RtlNtStatusToDosError(Status); goto done; } Status = NtUnloadDriver(&DriverPath); + if (Status == STATUS_INVALID_DEVICE_REQUEST) + dwError = ERROR_INVALID_SERVICE_CONTROL; + else + dwError = RtlNtStatusToDosError(Status); /* Release driver-unloading privilege */ RtlAdjustPrivilege(SE_LOAD_DRIVER_PRIVILEGE, @@ -120,7 +127,7 @@ ScmUnloadDriver(PSERVICE lpService) done: HeapFree(GetProcessHeap(), 0, pszDriverPath); - return RtlNtStatusToDosError(Status); + return dwError; } @@ -139,6 +146,7 @@ ScmGetDriverStatus(PSERVICE lpService, ULONG Index; DWORD dwError = ERROR_SUCCESS; BOOLEAN bFound = FALSE; + DWORD dwPreviousState; DPRINT1("ScmGetDriverStatus() called\n"); @@ -239,46 +247,61 @@ ScmGetDriverStatus(PSERVICE lpService, * We found the driver: it means it's running * We didn't find the driver: it wasn't running */ - if ((bFound != FALSE) && - (lpService->Status.dwCurrentState != SERVICE_STOP_PENDING)) + if (bFound) { - if (lpService->Status.dwCurrentState == SERVICE_STOPPED) + /* Found, return it's running */ + + dwPreviousState = lpService->Status.dwCurrentState; + + /* It is running */ + lpService->Status.dwCurrentState = SERVICE_RUNNING; + + if (dwPreviousState == SERVICE_STOPPED) { + /* Make it run if it was stopped before */ lpService->Status.dwWin32ExitCode = ERROR_SUCCESS; lpService->Status.dwServiceSpecificExitCode = ERROR_SUCCESS; + lpService->Status.dwControlsAccepted = SERVICE_ACCEPT_STOP; lpService->Status.dwCheckPoint = 0; lpService->Status.dwWaitHint = 0; - lpService->Status.dwControlsAccepted = 0; } - else - { - lpService->Status.dwCurrentState = SERVICE_RUNNING; - lpService->Status.dwControlsAccepted = SERVICE_ACCEPT_STOP; - if (lpService->Status.dwWin32ExitCode == ERROR_SERVICE_NEVER_STARTED) - lpService->Status.dwWin32ExitCode = ERROR_SUCCESS; - } + if (lpService->Status.dwWin32ExitCode == ERROR_SERVICE_NEVER_STARTED) + lpService->Status.dwWin32ExitCode = ERROR_SUCCESS; } - /* Not found, return it's stopped */ else { - lpService->Status.dwCurrentState = SERVICE_STOPPED; - lpService->Status.dwControlsAccepted = 0; - lpService->Status.dwCheckPoint = 0; - lpService->Status.dwWaitHint = 0; + /* Not found, return it's stopped */ if (lpService->Status.dwCurrentState == SERVICE_STOP_PENDING) + { + /* Stopped successfully */ lpService->Status.dwWin32ExitCode = ERROR_SUCCESS; + lpService->Status.dwCurrentState = SERVICE_STOPPED; + lpService->Status.dwControlsAccepted = 0; + lpService->Status.dwCheckPoint = 0; + lpService->Status.dwWaitHint = 0; + } + else if (lpService->Status.dwCurrentState == SERVICE_STOPPED) + { + /* Don't change the current status */ + } else + { lpService->Status.dwWin32ExitCode = ERROR_GEN_FAILURE; + lpService->Status.dwCurrentState = SERVICE_STOPPED; + lpService->Status.dwControlsAccepted = 0; + lpService->Status.dwCheckPoint = 0; + lpService->Status.dwWaitHint = 0; + } } /* Copy service status if required */ if (lpServiceStatus != NULL) { - memcpy(lpServiceStatus, - &lpService->Status, - sizeof(SERVICE_STATUS)); + RtlCopyMemory(lpServiceStatus, + &lpService->Status, + sizeof(SERVICE_STATUS)); } DPRINT1("ScmGetDriverStatus() done (Error: %lu)\n", dwError); @@ -320,26 +343,34 @@ ScmControlDriver(PSERVICE lpService, switch (dwControl) { case SERVICE_CONTROL_STOP: + /* Check the drivers status */ + dwError = ScmGetDriverStatus(lpService, + lpServiceStatus); + if (dwError != ERROR_SUCCESS) + goto done; + + /* Fail, if it is not running */ if (lpService->Status.dwCurrentState != SERVICE_RUNNING) { dwError = ERROR_INVALID_SERVICE_CONTROL; goto done; } + /* Unload the driver */ dwError = ScmUnloadDriver(lpService); - if (dwError == ERROR_SUCCESS) + if (dwError == ERROR_INVALID_SERVICE_CONTROL) { - lpService->Status.dwCurrentState = SERVICE_STOPPED; + /* The driver cannot be stopped, mark it non-stoppable */ lpService->Status.dwControlsAccepted = 0; - lpService->Status.dwWin32ExitCode = ERROR_SUCCESS; - - if (lpServiceStatus != NULL) - { - RtlCopyMemory(lpServiceStatus, - &lpService->Status, - sizeof(SERVICE_STATUS)); - } + goto done; } + + /* Make the driver 'stop pending' */ + lpService->Status.dwCurrentState = SERVICE_STOP_PENDING; + + /* Check the drivers status again */ + dwError = ScmGetDriverStatus(lpService, + lpServiceStatus); break; case SERVICE_CONTROL_INTERROGATE:
6 years, 10 months
1
0
0
0
01/01: [COMCTL32] Export GetWindowSubclass by name. CORE-14346
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b02d78586cac43e9d52b9…
commit b02d78586cac43e9d52b96386ff8691f508d8d6b Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Sun Feb 18 23:04:45 2018 +0100 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sun Feb 18 23:04:45 2018 +0100 [COMCTL32] Export GetWindowSubclass by name. CORE-14346 --- dll/win32/comctl32/comctl32.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/comctl32/comctl32.spec b/dll/win32/comctl32/comctl32.spec index f49c1270d0..b771553181 100644 --- a/dll/win32/comctl32/comctl32.spec +++ b/dll/win32/comctl32/comctl32.spec @@ -167,7 +167,7 @@ 403 stdcall -ordinal EnumMRUListW(long long ptr long) 404 stdcall -noname CreateMRUListLazyW(ptr long long long) 410 stdcall -ordinal SetWindowSubclass(long ptr long long) -411 stdcall -noname GetWindowSubclass(long ptr long ptr) +411 stdcall -ordinal GetWindowSubclass(long ptr long ptr) 412 stdcall -ordinal RemoveWindowSubclass(long ptr long) 413 stdcall -ordinal DefSubclassProc(long long long long) 414 stdcall -noname MirrorIcon(ptr ptr)
6 years, 10 months
1
0
0
0
01/01: [NTOSKRNL] Fix mismatching spinlock release in CcPerformReadAhead()
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dd392b9d6c55dfdbdac62…
commit dd392b9d6c55dfdbdac622587a76a695f92b8184 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun Feb 18 19:32:08 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun Feb 18 19:32:08 2018 +0100 [NTOSKRNL] Fix mismatching spinlock release in CcPerformReadAhead() --- ntoskrnl/cc/copy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c index a3b1f887aa..a90734000e 100644 --- a/ntoskrnl/cc/copy.c +++ b/ntoskrnl/cc/copy.c @@ -597,7 +597,7 @@ Clear: InterlockedAnd((volatile long *)&PrivateCacheMap->UlongFlags, 0xFFFEFFFF); KeReleaseSpinLockFromDpcLevel(&PrivateCacheMap->ReadAheadSpinLock); } - KeReleaseSpinLock(&PrivateCacheMap->ReadAheadSpinLock, OldIrql); + KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql); /* If file was locked, release it */ if (Locked)
6 years, 10 months
1
0
0
0
01/01: [KMTESTS:CC] Addendum to 3fe0e28: use ok_irql.
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=215e48d0bd0c54348d222…
commit 215e48d0bd0c54348d22290ccf2b7ec1fbffc264 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun Feb 18 14:50:29 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun Feb 18 14:51:35 2018 +0100 [KMTESTS:CC] Addendum to 3fe0e28: use ok_irql. CORE-14349 --- modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c b/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c index d7540f72e0..d0ba58c6ff 100644 --- a/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c +++ b/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c @@ -172,7 +172,7 @@ TestIrpHandler( if (IoStack->MajorFunction == IRP_MJ_CREATE) { - ok(KeGetCurrentIrql() == PASSIVE_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); + ok_irql(PASSIVE_LEVEL); if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR)) { @@ -237,7 +237,7 @@ TestIrpHandler( if (!FlagOn(Irp->Flags, IRP_NOCACHE)) { - ok(KeGetCurrentIrql() == PASSIVE_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); + ok_irql(PASSIVE_LEVEL); ok(Offset.QuadPart % PAGE_SIZE != 0, "Offset is aligned: %I64i\n", Offset.QuadPart); ok(Length % PAGE_SIZE != 0, "Length is aligned: %I64i\n", Length); @@ -274,7 +274,7 @@ TestIrpHandler( { PMDL Mdl; - ok(KeGetCurrentIrql() == APC_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); + ok_irql(APC_LEVEL); ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart); ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length); @@ -305,7 +305,7 @@ TestIrpHandler( } else if (IoStack->MajorFunction == IRP_MJ_CLEANUP) { - ok(KeGetCurrentIrql() == PASSIVE_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); + ok_irql(PASSIVE_LEVEL); KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE); CcUninitializeCacheMap(IoStack->FileObject, NULL, &CacheUninitEvent); KeWaitForSingleObject(&CacheUninitEvent.Event, Executive, KernelMode, FALSE, NULL);
6 years, 10 months
1
0
0
0
03/03: [KMTESTS:IO] Fix a Clang-Cl warning about NameLength
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=45aa17938689258e40247…
commit 45aa17938689258e402470f11ea845610696cc29 Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Sun Feb 18 14:06:23 2018 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Feb 18 14:14:56 2018 +0100 [KMTESTS:IO] Fix a Clang-Cl warning about NameLength "warning: variable 'NameLength' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]" CORE-14306 --- modules/rostests/kmtests/ntos_io/IoFilesystem.c | 62 +++++++++++++++---------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/modules/rostests/kmtests/ntos_io/IoFilesystem.c b/modules/rostests/kmtests/ntos_io/IoFilesystem.c index c974b8cf64..ff3a502f53 100644 --- a/modules/rostests/kmtests/ntos_io/IoFilesystem.c +++ b/modules/rostests/kmtests/ntos_io/IoFilesystem.c @@ -27,12 +27,13 @@ QueryFileInfo( Buffer = KmtAllocateGuarded(*Length); if (skip(Buffer != NULL, "Failed to allocate %Iu bytes\n", *Length)) return STATUS_INSUFFICIENT_RESOURCES; + + RtlFillMemory(Buffer, *Length, 0xdd); } else { Buffer = NULL; } - RtlFillMemory(Buffer, *Length, 0xDD); RtlFillMemory(&IoStatus, sizeof(IoStatus), 0x55); _SEH2_TRY { @@ -55,8 +56,16 @@ QueryFileInfo( ok_eq_hex(Status, STATUS_SUCCESS); Status = IoStatus.Status; } + *Length = IoStatus.Information; - *Info = Buffer; + if (NT_SUCCESS(Status)) + { + *Info = Buffer; + } + else if (Buffer) + { + KmtFreeGuarded(Buffer); + } return Status; } @@ -140,33 +149,35 @@ TestAllInformation(VOID) Length = FIELD_OFFSET(FILE_ALL_INFORMATION, NameInformation.FileName) + MAX_PATH * sizeof(WCHAR); Status = QueryFileInfo(FileHandle, (PVOID*)&FileAllInfo, &Length, FileAllInformation); ok_eq_hex(Status, STATUS_SUCCESS); - if (!skip(NT_SUCCESS(Status) && FileAllInfo != NULL, "No info\n")) + if (skip(NT_SUCCESS(Status) && FileAllInfo != NULL, "No info\n")) { - NameLength = FileAllInfo->NameInformation.FileNameLength; - ok_eq_size(Length, FIELD_OFFSET(FILE_ALL_INFORMATION, NameInformation.FileName) + NameLength); - Name = ExAllocatePoolWithTag(PagedPool, NameLength + sizeof(UNICODE_NULL), 'sFmK'); - if (!skip(Name != NULL, "Could not allocate %lu bytes\n", NameLength + (ULONG)sizeof(UNICODE_NULL))) + goto NoInfo; + } + + NameLength = FileAllInfo->NameInformation.FileNameLength; + ok_eq_size(Length, FIELD_OFFSET(FILE_ALL_INFORMATION, NameInformation.FileName) + NameLength); + Name = ExAllocatePoolWithTag(PagedPool, NameLength + sizeof(UNICODE_NULL), 'sFmK'); + if (!skip(Name != NULL, "Could not allocate %lu bytes\n", NameLength + (ULONG)sizeof(UNICODE_NULL))) + { + RtlCopyMemory(Name, + FileAllInfo->NameInformation.FileName, + NameLength); + Name[NameLength / sizeof(WCHAR)] = UNICODE_NULL; + ok(Name[0] == L'\\', "Name is %ls, expected first char to be \\\n", Name); + ok(NameLength >= Ntoskrnl.Length + sizeof(WCHAR), "NameLength %lu too short\n", NameLength); + if (NameLength >= Ntoskrnl.Length) { - RtlCopyMemory(Name, - FileAllInfo->NameInformation.FileName, - NameLength); - Name[NameLength / sizeof(WCHAR)] = UNICODE_NULL; - ok(Name[0] == L'\\', "Name is %ls, expected first char to be \\\n", Name); - ok(NameLength >= Ntoskrnl.Length + sizeof(WCHAR), "NameLength %lu too short\n", NameLength); - if (NameLength >= Ntoskrnl.Length) - { - NamePart.Buffer = Name + (NameLength - Ntoskrnl.Length) / sizeof(WCHAR); - NamePart.Length = Ntoskrnl.Length; - NamePart.MaximumLength = NamePart.Length; - ok(RtlEqualUnicodeString(&NamePart, &Ntoskrnl, TRUE), - "Name ends in '%wZ', expected %wZ\n", &NamePart, &Ntoskrnl); - } - ExFreePoolWithTag(Name, 'sFmK'); + NamePart.Buffer = Name + (NameLength - Ntoskrnl.Length) / sizeof(WCHAR); + NamePart.Length = Ntoskrnl.Length; + NamePart.MaximumLength = NamePart.Length; + ok(RtlEqualUnicodeString(&NamePart, &Ntoskrnl, TRUE), + "Name ends in '%wZ', expected %wZ\n", &NamePart, &Ntoskrnl); } - ok(FileAllInfo->NameInformation.FileName[NameLength / sizeof(WCHAR)] == 0xdddd, - "Char past FileName is %x\n", - FileAllInfo->NameInformation.FileName[NameLength / sizeof(WCHAR)]); + ExFreePoolWithTag(Name, 'sFmK'); } + ok(FileAllInfo->NameInformation.FileName[NameLength / sizeof(WCHAR)] == 0xdddd, + "Char past FileName is %x\n", + FileAllInfo->NameInformation.FileName[NameLength / sizeof(WCHAR)]); if (FileAllInfo) KmtFreeGuarded(FileAllInfo); @@ -210,6 +221,7 @@ TestAllInformation(VOID) if (FileAllInfo) KmtFreeGuarded(FileAllInfo); +NoInfo: Status = ObCloseHandle(FileHandle, KernelMode); ok_eq_hex(Status, STATUS_SUCCESS); }
6 years, 10 months
1
0
0
0
02/03: [KMTESTS:IO] Correctly free name in IoFilesystem's TestAllInformation.
by Thomas Faber
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0cc3f19b805860f393d08…
commit 0cc3f19b805860f393d08915d6dbd053439da7f3 Author: Thomas Faber <thomas.faber(a)reactos.org> AuthorDate: Sun Feb 18 14:05:10 2018 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Feb 18 14:14:54 2018 +0100 [KMTESTS:IO] Correctly free name in IoFilesystem's TestAllInformation. Spotted by Serge Gautherie. --- modules/rostests/kmtests/ntos_io/IoFilesystem.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/rostests/kmtests/ntos_io/IoFilesystem.c b/modules/rostests/kmtests/ntos_io/IoFilesystem.c index 65c76352d2..c974b8cf64 100644 --- a/modules/rostests/kmtests/ntos_io/IoFilesystem.c +++ b/modules/rostests/kmtests/ntos_io/IoFilesystem.c @@ -73,7 +73,7 @@ TestAllInformation(VOID) PFILE_ALL_INFORMATION FileAllInfo; SIZE_T Length; ULONG NameLength; - PWCHAR Name = NULL; + PWCHAR Name; UNICODE_STRING NamePart; InitializeObjectAttributes(&ObjectAttributes, @@ -161,6 +161,7 @@ TestAllInformation(VOID) ok(RtlEqualUnicodeString(&NamePart, &Ntoskrnl, TRUE), "Name ends in '%wZ', expected %wZ\n", &NamePart, &Ntoskrnl); } + ExFreePoolWithTag(Name, 'sFmK'); } ok(FileAllInfo->NameInformation.FileName[NameLength / sizeof(WCHAR)] == 0xdddd, "Char past FileName is %x\n", @@ -209,8 +210,6 @@ TestAllInformation(VOID) if (FileAllInfo) KmtFreeGuarded(FileAllInfo); - ExFreePoolWithTag(Name, 'sFmK'); - Status = ObCloseHandle(FileHandle, KernelMode); ok_eq_hex(Status, STATUS_SUCCESS); }
6 years, 10 months
1
0
0
0
01/03: [KMTESTS:NPFS] Fix 2 Clang-Cl warnings about ShareAccess
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9bc2a273938f43a8deebd…
commit 9bc2a273938f43a8deebdc91ecbe20d5968fceed Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr> AuthorDate: Tue Feb 13 13:05:35 2018 +0100 Commit: Thomas Faber <thomas.faber(a)reactos.org> CommitDate: Sun Feb 18 14:14:52 2018 +0100 [KMTESTS:NPFS] Fix 2 Clang-Cl warnings about ShareAccess "warning: variable 'ShareAccess' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]" CORE-14306 --- modules/rostests/kmtests/npfs/NpfsHelpers.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/rostests/kmtests/npfs/NpfsHelpers.c b/modules/rostests/kmtests/npfs/NpfsHelpers.c index 00864990b5..3dc9267bf8 100644 --- a/modules/rostests/kmtests/npfs/NpfsHelpers.c +++ b/modules/rostests/kmtests/npfs/NpfsHelpers.c @@ -103,6 +103,11 @@ NpCreatePipe( ShareAccess = FILE_SHARE_READ; else if (NamedPipeConfiguration == FILE_PIPE_FULL_DUPLEX) ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE; + else + { + ASSERTMSG("Invalid NamedPipeConfiguration parameter value!", FALSE); + return STATUS_INVALID_PARAMETER_6; + } DefaultTimeout.QuadPart = -50 * 1000 * 10; @@ -185,6 +190,11 @@ NpOpenPipe( ShareAccess = FILE_SHARE_READ; else if (NamedPipeConfiguration == FILE_PIPE_FULL_DUPLEX) ShareAccess = FILE_SHARE_READ | FILE_SHARE_WRITE; + else + { + ASSERTMSG("Invalid NamedPipeConfiguration parameter value!", FALSE); + return STATUS_INVALID_PARAMETER_3; + } return NpOpenPipeEx(ClientHandle, PipePath,
6 years, 10 months
1
0
0
0
01/01: [KMTESTS:CC] Add IRQL tests for CcCopyRead showing that a spinlock is held during Cc IO operations.
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3fe0e280b1ab4305c753e…
commit 3fe0e280b1ab4305c753e1facae0323e5053ac3b Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sun Feb 18 13:58:01 2018 +0100 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sun Feb 18 14:00:38 2018 +0100 [KMTESTS:CC] Add IRQL tests for CcCopyRead showing that a spinlock is held during Cc IO operations. CORE-14349 --- modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c b/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c index cc98945a04..d7540f72e0 100644 --- a/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c +++ b/modules/rostests/kmtests/ntos_cc/CcCopyRead_drv.c @@ -172,6 +172,8 @@ TestIrpHandler( if (IoStack->MajorFunction == IRP_MJ_CREATE) { + ok(KeGetCurrentIrql() == PASSIVE_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); + if (IoStack->FileObject->FileName.Length >= 2 * sizeof(WCHAR)) { TestDeviceObject = DeviceObject; @@ -235,6 +237,7 @@ TestIrpHandler( if (!FlagOn(Irp->Flags, IRP_NOCACHE)) { + ok(KeGetCurrentIrql() == PASSIVE_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); ok(Offset.QuadPart % PAGE_SIZE != 0, "Offset is aligned: %I64i\n", Offset.QuadPart); ok(Length % PAGE_SIZE != 0, "Length is aligned: %I64i\n", Length); @@ -271,6 +274,7 @@ TestIrpHandler( { PMDL Mdl; + ok(KeGetCurrentIrql() == APC_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); ok((Offset.QuadPart % PAGE_SIZE == 0 || Offset.QuadPart == 0), "Offset is not aligned: %I64i\n", Offset.QuadPart); ok(Length % PAGE_SIZE == 0, "Length is not aligned: %I64i\n", Length); @@ -301,6 +305,7 @@ TestIrpHandler( } else if (IoStack->MajorFunction == IRP_MJ_CLEANUP) { + ok(KeGetCurrentIrql() == PASSIVE_LEVEL, "Wrong IRQL: %d\n", KeGetCurrentIrql()); KeInitializeEvent(&CacheUninitEvent.Event, NotificationEvent, FALSE); CcUninitializeCacheMap(IoStack->FileObject, NULL, &CacheUninitEvent); KeWaitForSingleObject(&CacheUninitEvent.Event, Executive, KernelMode, FALSE, NULL);
6 years, 10 months
1
0
0
0
← Newer
1
...
5
6
7
8
9
10
11
...
24
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
Results per page:
10
25
50
100
200