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
June 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
26 participants
174 discussions
Start a n
N
ew thread
01/01: [FASTFAT] Don't add an extra \, when renaming a file at root.
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=52f0f80a83dfd1f751c3d…
commit 52f0f80a83dfd1f751c3d6228a2c246606078974 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Jun 9 22:17:17 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Jun 9 22:17:17 2018 +0200 [FASTFAT] Don't add an extra \, when renaming a file at root. This fixes failures to rename a file where destination is the root of a FAT volume. CORE-10503 --- drivers/filesystems/fastfat/finfo.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/filesystems/fastfat/finfo.c b/drivers/filesystems/fastfat/finfo.c index 517d7381d6..a19c21db55 100644 --- a/drivers/filesystems/fastfat/finfo.c +++ b/drivers/filesystems/fastfat/finfo.c @@ -787,8 +787,12 @@ VfatSetRenameInformation( } RtlCopyUnicodeString(&NewName, &((PVFATFCB)TargetFileObject->FsContext)->PathNameU); - NewName.Buffer[NewName.Length / sizeof(WCHAR)] = L'\\'; - NewName.Length += sizeof(WCHAR); + /* If \, it's already backslash terminated, don't add it */ + if (!vfatFCBIsRoot(TargetFileObject->FsContext)) + { + NewName.Buffer[NewName.Length / sizeof(WCHAR)] = L'\\'; + NewName.Length += sizeof(WCHAR); + } RtlAppendUnicodeStringToString(&NewName, &TargetFileObject->FileName); }
6 years, 6 months
1
0
0
0
01/01: [FASTFAT] Use the FastFAT mechanism for counting clusters already implemented
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6aa4beeefb2c2fbb025c5…
commit 6aa4beeefb2c2fbb025c5fb97cc74cd799c6622b Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Jun 9 18:21:32 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Jun 9 18:23:07 2018 +0200 [FASTFAT] Use the FastFAT mechanism for counting clusters already implemented This allows us having more accurate statistics regarding available clusters count. Even though FastFAT and chkdsk still don't agree! CORE-3877 --- drivers/filesystems/fastfat/dirwr.c | 12 +++++++----- drivers/filesystems/fastfat/fat.c | 23 +++++++++++------------ drivers/filesystems/fastfat/finfo.c | 8 ++------ drivers/filesystems/fastfat/fsctl.c | 1 + drivers/filesystems/fastfat/rw.c | 5 ----- drivers/filesystems/fastfat/vfat.h | 4 +--- 6 files changed, 22 insertions(+), 31 deletions(-) diff --git a/drivers/filesystems/fastfat/dirwr.c b/drivers/filesystems/fastfat/dirwr.c index ac1b7a5549..b4a2a94b59 100644 --- a/drivers/filesystems/fastfat/dirwr.c +++ b/drivers/filesystems/fastfat/dirwr.c @@ -670,6 +670,11 @@ FATAddEntry( } return STATUS_DISK_FULL; } + + if (DeviceExt->FatInfo.FatType == FAT32) + { + FAT32UpdateFreeClustersCount(DeviceExt); + } } else { @@ -1021,20 +1026,17 @@ FATDelEntry( /* In case of moving, don't delete data */ if (MoveContext == NULL) { - ULONG ClusterCount = 0; - while (CurrentCluster && CurrentCluster != 0xffffffff) { GetNextCluster(DeviceExt, CurrentCluster, &NextCluster); /* FIXME: check status */ WriteCluster(DeviceExt, CurrentCluster, 0); CurrentCluster = NextCluster; - ClusterCount++; } - if (ClusterCount != 0 && DeviceExt->FatInfo.FatType == FAT32) + if (DeviceExt->FatInfo.FatType == FAT32) { - FAT32UpdateFreeClustersCount(DeviceExt, ClusterCount, TRUE); + FAT32UpdateFreeClustersCount(DeviceExt); } } diff --git a/drivers/filesystems/fastfat/fat.c b/drivers/filesystems/fastfat/fat.c index b291ff2843..5842091a30 100644 --- a/drivers/filesystems/fastfat/fat.c +++ b/drivers/filesystems/fastfat/fat.c @@ -557,7 +557,10 @@ CountAvailableClusters( else Status = FAT32CountAvailableClusters(DeviceExt); } - Clusters->QuadPart = DeviceExt->AvailableClusters; + if (Clusters != NULL) + { + Clusters->QuadPart = DeviceExt->AvailableClusters; + } ExReleaseResourceLite (&DeviceExt->FatResource); return Status; @@ -1214,9 +1217,7 @@ FAT32SetDirtyStatus( NTSTATUS FAT32UpdateFreeClustersCount( - PDEVICE_EXTENSION DeviceExt, - ULONG Count, - BOOLEAN Freed) + PDEVICE_EXTENSION DeviceExt) { LARGE_INTEGER Offset; ULONG Length; @@ -1227,6 +1228,11 @@ FAT32UpdateFreeClustersCount( #endif struct _FsInfoSector * Sector; + if (!DeviceExt->AvailableClustersValid) + { + return STATUS_INVALID_PARAMETER; + } + /* We'll read (and then write) the fsinfo sector */ Offset.QuadPart = DeviceExt->FatInfo.FSInfoSector * DeviceExt->FatInfo.BytesPerSector; Length = DeviceExt->FatInfo.BytesPerSector; @@ -1275,14 +1281,7 @@ FAT32UpdateFreeClustersCount( } /* Update the free clusters count */ - if (Freed) - { - Sector->FreeCluster += Count; - } - else - { - Sector->FreeCluster -= Count; - } + Sector->FreeCluster = InterlockedCompareExchange((PLONG)&DeviceExt->AvailableClusters, 0, 0); #ifndef VOLUME_IS_NOT_CACHED_WORK_AROUND_IT /* Mark FSINFO sector dirty so that it gets written to the disk */ diff --git a/drivers/filesystems/fastfat/finfo.c b/drivers/filesystems/fastfat/finfo.c index 2840b1369b..517d7381d6 100644 --- a/drivers/filesystems/fastfat/finfo.c +++ b/drivers/filesystems/fastfat/finfo.c @@ -1344,8 +1344,6 @@ VfatSetAllocationSizeInformation( } else if (NewSize + ClusterSize <= Fcb->RFCB.AllocationSize.u.LowPart) { - ULONG ClusterCount; - DPRINT("Check for the ability to set file size\n"); if (!MmCanFileBeTruncated(FileObject->SectionObjectPointer, (PLARGE_INTEGER)AllocationSize)) @@ -1393,18 +1391,16 @@ VfatSetAllocationSizeInformation( Status = STATUS_SUCCESS; } - ClusterCount = 0; while (NT_SUCCESS(Status) && 0xffffffff != Cluster && Cluster > 1) { Status = NextCluster(DeviceExt, FirstCluster, &NCluster, FALSE); WriteCluster(DeviceExt, Cluster, 0); Cluster = NCluster; - ClusterCount++; } - if (ClusterCount != 0 && DeviceExt->FatInfo.FatType == FAT32) + if (DeviceExt->FatInfo.FatType == FAT32) { - FAT32UpdateFreeClustersCount(DeviceExt, ClusterCount, TRUE); + FAT32UpdateFreeClustersCount(DeviceExt); } } else diff --git a/drivers/filesystems/fastfat/fsctl.c b/drivers/filesystems/fastfat/fsctl.c index 486535d129..b849bf4119 100644 --- a/drivers/filesystems/fastfat/fsctl.c +++ b/drivers/filesystems/fastfat/fsctl.c @@ -737,6 +737,7 @@ VfatMount( _SEH2_END; DeviceExt->LastAvailableCluster = 2; + CountAvailableClusters(DeviceExt, NULL); ExInitializeResourceLite(&DeviceExt->FatResource); InitializeListHead(&DeviceExt->FcbListHead); diff --git a/drivers/filesystems/fastfat/rw.c b/drivers/filesystems/fastfat/rw.c index d78054eced..60713e104c 100644 --- a/drivers/filesystems/fastfat/rw.c +++ b/drivers/filesystems/fastfat/rw.c @@ -540,11 +540,6 @@ VfatWriteFileData( } } - if (NT_SUCCESS(Status) && ClusterCount != 0 && DeviceExt->FatInfo.FatType == FAT32) - { - FAT32UpdateFreeClustersCount(DeviceExt, ClusterCount, FALSE); - } - return Status; } diff --git a/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/fastfat/vfat.h index 64a96796a0..bec3dc8394 100644 --- a/drivers/filesystems/fastfat/vfat.h +++ b/drivers/filesystems/fastfat/vfat.h @@ -931,9 +931,7 @@ FAT32SetDirtyStatus( NTSTATUS FAT32UpdateFreeClustersCount( - PDEVICE_EXTENSION DeviceExt, - ULONG Count, - BOOLEAN Freed); + PDEVICE_EXTENSION DeviceExt); /* fcb.c */
6 years, 6 months
1
0
0
0
03/03: [RAPPS] Fix command line handling
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f133d01f20855a27fc5f7…
commit f133d01f20855a27fc5f7afb0abeef807d6aa53a Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Tue Jun 5 22:08:18 2018 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Jun 9 17:14:06 2018 +0200 [RAPPS] Fix command line handling --- base/applications/rapps/available.cpp | 2 +- base/applications/rapps/unattended.cpp | 10 +++++----- base/applications/rapps/winmain.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base/applications/rapps/available.cpp b/base/applications/rapps/available.cpp index 61c5a16e5e..c6ee68f7f2 100644 --- a/base/applications/rapps/available.cpp +++ b/base/applications/rapps/available.cpp @@ -402,7 +402,7 @@ CAvailableApplicationInfo* CAvailableApps::FindInfo(const ATL::CStringW& szAppNa while (CurrentListPosition != NULL) { info = m_InfoList.GetNext(CurrentListPosition); - if (info->m_szName == szAppName) + if (info->m_szName.CompareNoCase(szAppName) == 0) { return info; } diff --git a/base/applications/rapps/unattended.cpp b/base/applications/rapps/unattended.cpp index 06f8537999..7f7f3510f6 100644 --- a/base/applications/rapps/unattended.cpp +++ b/base/applications/rapps/unattended.cpp @@ -11,7 +11,7 @@ #include <setupapi.h> -#define MIN_ARGS 2 +#define MIN_ARGS 3 BOOL UseCmdParameters(LPWSTR lpCmdLine) { @@ -25,17 +25,17 @@ BOOL UseCmdParameters(LPWSTR lpCmdLine) // TODO: use DB filenames as names because they're shorter ATL::CSimpleArray<ATL::CStringW> arrNames; - if (!StrCmpW(argv[0], CMD_KEY_INSTALL)) + if (!StrCmpIW(argv[1], CMD_KEY_INSTALL)) { - for (INT i = 1; i < argc; ++i) + for (INT i = 2; i < argc; ++i) { arrNames.Add(argv[i]); } } else - if (!StrCmpW(argv[0], CMD_KEY_SETUP)) + if (!StrCmpIW(argv[1], CMD_KEY_SETUP)) { - HINF InfHandle = SetupOpenInfFileW(argv[1], NULL, INF_STYLE_WIN4, NULL); + HINF InfHandle = SetupOpenInfFileW(argv[2], NULL, INF_STYLE_WIN4, NULL); if (InfHandle == INVALID_HANDLE_VALUE) { return FALSE; diff --git a/base/applications/rapps/winmain.cpp b/base/applications/rapps/winmain.cpp index 386023785e..98f44a19e0 100644 --- a/base/applications/rapps/winmain.cpp +++ b/base/applications/rapps/winmain.cpp @@ -160,7 +160,7 @@ INT WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLi InitCommonControls(); // skip window creation if there were some keys - if (!UseCmdParameters(lpCmdLine)) + if (!UseCmdParameters(GetCommandLineW())) { if (SettingsInfo.bUpdateAtStart || bIsFirstLaunch) CAvailableApps::ForceUpdateAppsDB();
6 years, 6 months
1
0
0
0
02/03: [ATL] Add CString.CompareNoCase
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f8dc9c26663ea6d6721a…
commit 4f8dc9c26663ea6d6721a96366cd90961f7b05c3 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Wed Jun 6 00:21:06 2018 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Jun 9 17:14:06 2018 +0200 [ATL] Add CString.CompareNoCase --- sdk/lib/atl/cstringt.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sdk/lib/atl/cstringt.h b/sdk/lib/atl/cstringt.h index 5d278c5a0a..87ac52aac6 100644 --- a/sdk/lib/atl/cstringt.h +++ b/sdk/lib/atl/cstringt.h @@ -133,6 +133,13 @@ public: return ::wcscmp(psz1, psz2); } + static int __cdecl CompareNoCase( + _In_z_ LPCWSTR psz1, + _In_z_ LPCWSTR psz2) + { + return ::_wcsicmp(psz1, psz2); + } + static int __cdecl FormatV( _In_opt_z_ LPWSTR pszDest, _In_z_ LPCWSTR pszFormat, @@ -265,6 +272,13 @@ public: return ::strcmp(psz1, psz2); } + static int __cdecl CompareNoCase( + _In_z_ LPCSTR psz1, + _In_z_ LPCSTR psz2) + { + return ::_stricmp(psz1, psz2); + } + static int __cdecl FormatV( _In_opt_z_ LPSTR pszDest, _In_z_ LPCSTR pszFormat, @@ -593,6 +607,10 @@ public: return StringTraits::Compare(CThisSimpleString::GetString(), psz); } + int CompareNoCase(_In_z_ PCXSTR psz) const + { + return StringTraits::CompareNoCase(CThisSimpleString::GetString(), psz); + } CStringT Mid(int iFirst, int nCount) const {
6 years, 6 months
1
0
0
0
01/03: [RAPPS] Select the search bar with ctrl+f
by Mark Jansen
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0ec08818b5dfe401afaf4…
commit 0ec08818b5dfe401afaf4778b861f67eae0cb2f1 Author: Mark Jansen <mark.jansen(a)reactos.org> AuthorDate: Tue Jun 5 22:07:39 2018 +0200 Commit: Mark Jansen <mark.jansen(a)reactos.org> CommitDate: Sat Jun 9 17:14:06 2018 +0200 [RAPPS] Select the search bar with ctrl+f --- base/applications/rapps/gui.cpp | 4 ++++ base/applications/rapps/include/resource.h | 1 + base/applications/rapps/rapps.rc | 1 + 3 files changed, 6 insertions(+) diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp index ed2c3b8264..1b715b6d8b 100644 --- a/base/applications/rapps/gui.cpp +++ b/base/applications/rapps/gui.cpp @@ -1456,6 +1456,10 @@ private: PostMessageW(WM_CLOSE, 0, 0); break; + case ID_SEARCH: + ::SetFocus(m_SearchBar->m_hWnd); + break; + case ID_INSTALL: if (IsAvailableEnum(SelectedEnumType)) { diff --git a/base/applications/rapps/include/resource.h b/base/applications/rapps/include/resource.h index 7d5a9b9ebf..fcd1502f1a 100644 --- a/base/applications/rapps/include/resource.h +++ b/base/applications/rapps/include/resource.h @@ -79,6 +79,7 @@ #define ID_REGREMOVE 560 #define ID_RESETDB 561 #define ID_CHECK_ALL 562 +#define ID_SEARCH 563 /* Strings */ #define IDS_APPTITLE 100 diff --git a/base/applications/rapps/rapps.rc b/base/applications/rapps/rapps.rc index 4d4c796c2e..296b99b6b4 100644 --- a/base/applications/rapps/rapps.rc +++ b/base/applications/rapps/rapps.rc @@ -50,6 +50,7 @@ HOTKEYS ACCELERATORS VK_F5, ID_RESETDB, CONTROL, VIRTKEY VK_DELETE, ID_UNINSTALL, CONTROL, VIRTKEY VK_RETURN, ID_INSTALL, CONTROL, VIRTKEY + "F", ID_SEARCH, CONTROL, VIRTKEY } #include <reactos/manifest_exe.rc>
6 years, 6 months
1
0
0
0
01/01: [USERSRV] HardError: Free WindowTitleU buffer only if we really allocated it.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7cb411e88fa68419c2cce…
commit 7cb411e88fa68419c2cce8a3eb544945bd4af095 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Jun 9 15:37:54 2018 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sat Jun 9 15:37:54 2018 +0200 [USERSRV] HardError: Free WindowTitleU buffer only if we really allocated it. --- win32ss/user/winsrv/usersrv/harderror.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/win32ss/user/winsrv/usersrv/harderror.c b/win32ss/user/winsrv/usersrv/harderror.c index 7cc3a67ca4..85ef9fe23d 100644 --- a/win32ss/user/winsrv/usersrv/harderror.c +++ b/win32ss/user/winsrv/usersrv/harderror.c @@ -641,8 +641,10 @@ UserpFormatMessages( CaptionStringU->Length = (USHORT)(wcslen(CaptionStringU->Buffer) * sizeof(WCHAR)); /* Free the strings if needed */ - if (WindowTitleU.Buffer) RtlFreeUnicodeString(&WindowTitleU); - if (hProcess) RtlFreeUnicodeString(&FileNameU); + if (WindowTitleU.Buffer && (WindowTitleU.MaximumLength != 0)) + RtlFreeUnicodeString(&WindowTitleU); + if (hProcess) + RtlFreeUnicodeString(&FileNameU); Format2A.Buffer = NULL;
6 years, 6 months
1
0
0
0
02/02: [FASTFAT] Start implementing FAT32 statistics support
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=704baed2df04470ab134c…
commit 704baed2df04470ab134cef207847764e3d95e2e Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Jun 9 12:36:43 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Jun 9 12:36:43 2018 +0200 [FASTFAT] Start implementing FAT32 statistics support Not fully perfect yet, chkdsk still complains. CORE-3877 --- drivers/filesystems/fastfat/dirwr.c | 8 ++++ drivers/filesystems/fastfat/fat.c | 85 +++++++++++++++++++++++++++++++++++++ drivers/filesystems/fastfat/finfo.c | 9 ++++ drivers/filesystems/fastfat/rw.c | 6 +++ drivers/filesystems/fastfat/vfat.h | 6 +++ 5 files changed, 114 insertions(+) diff --git a/drivers/filesystems/fastfat/dirwr.c b/drivers/filesystems/fastfat/dirwr.c index ab5d9b3ee4..ac1b7a5549 100644 --- a/drivers/filesystems/fastfat/dirwr.c +++ b/drivers/filesystems/fastfat/dirwr.c @@ -1021,12 +1021,20 @@ FATDelEntry( /* In case of moving, don't delete data */ if (MoveContext == NULL) { + ULONG ClusterCount = 0; + while (CurrentCluster && CurrentCluster != 0xffffffff) { GetNextCluster(DeviceExt, CurrentCluster, &NextCluster); /* FIXME: check status */ WriteCluster(DeviceExt, CurrentCluster, 0); CurrentCluster = NextCluster; + ClusterCount++; + } + + if (ClusterCount != 0 && DeviceExt->FatInfo.FatType == FAT32) + { + FAT32UpdateFreeClustersCount(DeviceExt, ClusterCount, TRUE); } } diff --git a/drivers/filesystems/fastfat/fat.c b/drivers/filesystems/fastfat/fat.c index 95ef6958d5..b291ff2843 100644 --- a/drivers/filesystems/fastfat/fat.c +++ b/drivers/filesystems/fastfat/fat.c @@ -1212,4 +1212,89 @@ FAT32SetDirtyStatus( #endif } +NTSTATUS +FAT32UpdateFreeClustersCount( + PDEVICE_EXTENSION DeviceExt, + ULONG Count, + BOOLEAN Freed) +{ + LARGE_INTEGER Offset; + ULONG Length; +#ifdef VOLUME_IS_NOT_CACHED_WORK_AROUND_IT + NTSTATUS Status; +#else + PVOID Context; +#endif + struct _FsInfoSector * Sector; + + /* We'll read (and then write) the fsinfo sector */ + Offset.QuadPart = DeviceExt->FatInfo.FSInfoSector * DeviceExt->FatInfo.BytesPerSector; + Length = DeviceExt->FatInfo.BytesPerSector; +#ifndef VOLUME_IS_NOT_CACHED_WORK_AROUND_IT + /* Go through Cc for this */ + _SEH2_TRY + { + CcPinRead(DeviceExt->VolumeFcb->FileObject, &Offset, Length, PIN_WAIT, &Context, (PVOID *)&Sector); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + _SEH2_YIELD(return _SEH2_GetExceptionCode()); + } + _SEH2_END; +#else + /* No Cc, do it the old way: + * - Allocate a big enough buffer + * - And read the disk + */ + Sector = ExAllocatePoolWithTag(NonPagedPool, Length, TAG_VFAT); + if (Sector == NULL) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + + Status = VfatReadDisk(DeviceExt->StorageDevice, &Offset, Length, (PUCHAR)Sector, FALSE); + if (!NT_SUCCESS(Status)) + { + ExFreePoolWithTag(Sector, TAG_VFAT); + return Status; + } +#endif + + /* Make sure we have a FSINFO sector */ + if (Sector->ExtBootSignature2 != 0x41615252 || + Sector->FSINFOSignature != 0x61417272 || + Sector->Signatur2 != 0xaa550000) + { + ASSERT(FALSE); +#ifndef VOLUME_IS_NOT_CACHED_WORK_AROUND_IT + CcUnpinData(Context); +#else + ExFreePoolWithTag(Sector, TAG_VFAT); +#endif + return STATUS_DISK_CORRUPT_ERROR; + } + + /* Update the free clusters count */ + if (Freed) + { + Sector->FreeCluster += Count; + } + else + { + Sector->FreeCluster -= Count; + } + +#ifndef VOLUME_IS_NOT_CACHED_WORK_AROUND_IT + /* Mark FSINFO sector dirty so that it gets written to the disk */ + CcSetDirtyPinnedData(Context, NULL); + CcUnpinData(Context); + return STATUS_SUCCESS; +#else + /* Write back the FSINFO sector to the disk */ + Status = VfatWriteDisk(DeviceExt->StorageDevice, &Offset, Length, (PUCHAR)Sector, FALSE); + ExFreePoolWithTag(Sector, TAG_VFAT); + return Status; +#endif +} + /* EOF */ diff --git a/drivers/filesystems/fastfat/finfo.c b/drivers/filesystems/fastfat/finfo.c index af2e1ce62a..2840b1369b 100644 --- a/drivers/filesystems/fastfat/finfo.c +++ b/drivers/filesystems/fastfat/finfo.c @@ -1344,6 +1344,8 @@ VfatSetAllocationSizeInformation( } else if (NewSize + ClusterSize <= Fcb->RFCB.AllocationSize.u.LowPart) { + ULONG ClusterCount; + DPRINT("Check for the ability to set file size\n"); if (!MmCanFileBeTruncated(FileObject->SectionObjectPointer, (PLARGE_INTEGER)AllocationSize)) @@ -1391,11 +1393,18 @@ VfatSetAllocationSizeInformation( Status = STATUS_SUCCESS; } + ClusterCount = 0; while (NT_SUCCESS(Status) && 0xffffffff != Cluster && Cluster > 1) { Status = NextCluster(DeviceExt, FirstCluster, &NCluster, FALSE); WriteCluster(DeviceExt, Cluster, 0); Cluster = NCluster; + ClusterCount++; + } + + if (ClusterCount != 0 && DeviceExt->FatInfo.FatType == FAT32) + { + FAT32UpdateFreeClustersCount(DeviceExt, ClusterCount, TRUE); } } else diff --git a/drivers/filesystems/fastfat/rw.c b/drivers/filesystems/fastfat/rw.c index 043bafef6c..d78054eced 100644 --- a/drivers/filesystems/fastfat/rw.c +++ b/drivers/filesystems/fastfat/rw.c @@ -539,6 +539,12 @@ VfatWriteFileData( Status = IrpContext->Irp->IoStatus.Status; } } + + if (NT_SUCCESS(Status) && ClusterCount != 0 && DeviceExt->FatInfo.FatType == FAT32) + { + FAT32UpdateFreeClustersCount(DeviceExt, ClusterCount, FALSE); + } + return Status; } diff --git a/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/fastfat/vfat.h index fcb22b9c5a..64a96796a0 100644 --- a/drivers/filesystems/fastfat/vfat.h +++ b/drivers/filesystems/fastfat/vfat.h @@ -929,6 +929,12 @@ FAT32SetDirtyStatus( PDEVICE_EXTENSION DeviceExt, BOOLEAN DirtyStatus); +NTSTATUS +FAT32UpdateFreeClustersCount( + PDEVICE_EXTENSION DeviceExt, + ULONG Count, + BOOLEAN Freed); + /* fcb.c */ PVFATFCB
6 years, 6 months
1
0
0
0
01/02: [FASTFAT] Save the FSINFO sector location
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=04640f9264c752a80da87…
commit 04640f9264c752a80da87d519b6a8c369f07f611 Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Jun 9 12:11:43 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Jun 9 12:11:43 2018 +0200 [FASTFAT] Save the FSINFO sector location --- drivers/filesystems/fastfat/fsctl.c | 1 + drivers/filesystems/fastfat/vfat.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/filesystems/fastfat/fsctl.c b/drivers/filesystems/fastfat/fsctl.c index f7eaf0c774..486535d129 100644 --- a/drivers/filesystems/fastfat/fsctl.c +++ b/drivers/filesystems/fastfat/fsctl.c @@ -232,6 +232,7 @@ VfatHasFileSystem( FatInfo.RootCluster = ((struct _BootSector32*) Boot)->RootCluster; FatInfo.rootStart = FatInfo.dataStart + ((FatInfo.RootCluster - 2) * FatInfo.SectorsPerCluster); FatInfo.VolumeID = ((struct _BootSector32*) Boot)->VolumeID; + FatInfo.FSInfoSector = ((struct _BootSector32*) Boot)->FSInfoSector; RtlCopyMemory(&FatInfo.VolumeLabel, &((struct _BootSector32*)Boot)->VolumeLabel, sizeof(FatInfo.VolumeLabel)); } else diff --git a/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/fastfat/vfat.h index 8148d2fc14..fcb22b9c5a 100644 --- a/drivers/filesystems/fastfat/vfat.h +++ b/drivers/filesystems/fastfat/vfat.h @@ -263,6 +263,7 @@ typedef struct ULONG FatType; ULONG Sectors; BOOLEAN FixedMedia; + ULONG FSInfoSector; } FATINFO, *PFATINFO; struct _VFATFCB;
6 years, 6 months
1
0
0
0
01/01: [AUTOCHK] Let the timeout for disk repair to be configured
by Pierre Schweitzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2149c3d0d04f4baa9338a…
commit 2149c3d0d04f4baa9338a4a7cc243d8d1815a13c Author: Pierre Schweitzer <pierre(a)reactos.org> AuthorDate: Sat Jun 9 00:18:21 2018 +0200 Commit: Pierre Schweitzer <pierre(a)reactos.org> CommitDate: Sat Jun 9 00:19:09 2018 +0200 [AUTOCHK] Let the timeout for disk repair to be configured --- base/system/autochk/autochk.c | 44 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/base/system/autochk/autochk.c b/base/system/autochk/autochk.c index 918d709878..5a71ae7d36 100644 --- a/base/system/autochk/autochk.c +++ b/base/system/autochk/autochk.c @@ -160,7 +160,8 @@ OpenKeyboard(VOID) } static NTSTATUS -WaitForKeyboard(VOID) +WaitForKeyboard( + IN LONG TimeOut) { NTSTATUS Status; IO_STATUS_BLOCK IoStatusBlock; @@ -180,8 +181,8 @@ WaitForKeyboard(VOID) NULL); if (Status == STATUS_PENDING) { - /* Wait 3s */ - Timeout.QuadPart = (LONG)-3*1000*1000*10; + /* Wait TimeOut seconds */ + Timeout.QuadPart = TimeOut * -10000000; Status = NtWaitForSingleObject(KeyboardHandle, FALSE, &Timeout); /* The user didn't enter anything, cancel the read */ if (Status == STATUS_TIMEOUT) @@ -338,7 +339,8 @@ ChkdskCallback( static NTSTATUS CheckVolume( - IN PWCHAR DrivePath) + IN PWCHAR DrivePath, + IN LONG TimeOut) { WCHAR FileSystem[128]; WCHAR NtDrivePath[64]; @@ -390,10 +392,10 @@ CheckVolume( /* Let the user decide whether to repair */ PrintString(" %S needs to be checked\r\n", DrivePath); PrintString(" You can skip it, but be advised it is not recommanded\r\n"); - PrintString(" To skip disk checking press any key in 3 seconds\r\n", DrivePath); + PrintString(" To skip disk checking press any key in %d second(s)\r\n", TimeOut); /* Timeout == fix it! */ - WaitStatus = WaitForKeyboard(); + WaitStatus = WaitForKeyboard(TimeOut); if (WaitStatus == STATUS_TIMEOUT) { Status = FileSystems[Count].ChkdskFunc(&DrivePathU, @@ -421,6 +423,29 @@ CheckVolume( return Status; } +static VOID +QueryTimeout( + IN OUT PLONG TimeOut) +{ + RTL_QUERY_REGISTRY_TABLE QueryTable[2]; + + RtlZeroMemory(QueryTable, sizeof(QueryTable)); + QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT; + QueryTable[0].Name = L"AutoChkTimeOut"; + QueryTable[0].EntryContext = TimeOut; + + RtlQueryRegistryValues(RTL_REGISTRY_CONTROL, L"Session Manager", QueryTable, NULL, NULL); + /* See:
https://docs.microsoft.com/en-us/windows-server/administration/windows-comm…
*/ + if (*TimeOut > 259200) + { + *TimeOut = 259200; + } + else if (*TimeOut < 0) + { + *TimeOut = 0; + } +} + /* Native image's entry point */ int _cdecl @@ -433,6 +458,7 @@ _main(int argc, ULONG i; NTSTATUS Status; WCHAR DrivePath[128]; + LONG TimeOut; // Win2003 passes the only param - "*". Probably means to check all drives /* @@ -441,6 +467,10 @@ _main(int argc, DPRINT("Param %d: %s\n", i, argv[i]); */ + /* Query timeout */ + TimeOut = 3; + QueryTimeout(&TimeOut); + /* FIXME: We should probably use here the mount manager to be * able to check volumes which don't have a drive letter. */ @@ -471,7 +501,7 @@ _main(int argc, && (DeviceMap.Query.DriveType[i] == DOSDEVICE_DRIVE_FIXED)) { swprintf(DrivePath, L"%c:\\", L'A'+i); - CheckVolume(DrivePath); + CheckVolume(DrivePath, TimeOut); } }
6 years, 6 months
1
0
0
0
01/01: [TRANSLATION][DRWTSN32] Implement Romanian and Italian resource translations for Dr.Watson (#607)
by Bișoc George
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4217688b49c89fd560761…
commit 4217688b49c89fd5607617cf219563b4eec2d756 Author: Bișoc George <fraizeraust99(a)gmail.com> AuthorDate: Fri Jun 8 19:06:56 2018 +0200 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> CommitDate: Fri Jun 8 19:06:56 2018 +0200 [TRANSLATION][DRWTSN32] Implement Romanian and Italian resource translations for Dr.Watson (#607) --- base/applications/drwtsn32/drwtsn32.rc | 6 ++++++ base/applications/drwtsn32/lang/it-IT.rc | 14 ++++++++++++++ base/applications/drwtsn32/lang/ro-RO.rc | 14 ++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/base/applications/drwtsn32/drwtsn32.rc b/base/applications/drwtsn32/drwtsn32.rc index 17597e31db..1e173d8de9 100644 --- a/base/applications/drwtsn32/drwtsn32.rc +++ b/base/applications/drwtsn32/drwtsn32.rc @@ -28,9 +28,15 @@ #ifdef LANGUAGE_FR_FR #include "lang/fr-FR.rc" #endif +#ifdef LANGUAGE_IT_IT + #include "lang/it-IT.rc" +#endif #ifdef LANGUAGE_PL_PL #include "lang/pl-PL.rc" #endif +#ifdef LANGUAGE_RO_RO + #include "lang/ro-RO.rc" +#endif #ifdef LANGUAGE_ZH_CN #include "lang/zh-CN.rc" #endif diff --git a/base/applications/drwtsn32/lang/it-IT.rc b/base/applications/drwtsn32/lang/it-IT.rc new file mode 100644 index 0000000000..4743ce9895 --- /dev/null +++ b/base/applications/drwtsn32/lang/it-IT.rc @@ -0,0 +1,14 @@ +/* + * PROJECT: Dr. Watson crash reporter + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Italian resource file + * COPYRIGHT: Copyright 2018 Bișoc George (fraizeraust99 at gmail dot com) + */ + +LANGUAGE LANG_ITALIAN, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_APP_TITLE "ReactOS Crash Reporter" + IDS_USER_ALERT_MESSAGE "L'applicazione %ls ha smesso di funzionare. Le informazioni su questo crash sono state salvate in:\r\n\r\n%ls" +END diff --git a/base/applications/drwtsn32/lang/ro-RO.rc b/base/applications/drwtsn32/lang/ro-RO.rc new file mode 100644 index 0000000000..6ab1c722f3 --- /dev/null +++ b/base/applications/drwtsn32/lang/ro-RO.rc @@ -0,0 +1,14 @@ +/* + * PROJECT: Dr. Watson crash reporter + * LICENSE: GPL-2.0+ (
https://spdx.org/licenses/GPL-2.0+
) + * PURPOSE: Romanian resource file + * COPYRIGHT: Copyright 2018 Bișoc George (fraizeraust99 at gmail dot com) + */ + +LANGUAGE LANG_ROMANIAN, SUBLANG_NEUTRAL + +STRINGTABLE +BEGIN + IDS_APP_TITLE "Crash reporter de ReactOS" + IDS_USER_ALERT_MESSAGE "Aplicația %ls a eșuat să funcționeze. Informațiile despre acest crash sunt salvate în:\r\n\r\n%ls" +END
6 years, 6 months
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
18
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Results per page:
10
25
50
100
200