ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2017
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
284 discussions
Start a n
N
ew thread
[jimtabor] 75770: [Shell32] - Patch by Fabian Maurer : Draw text on message boxes without background. - Fixes CORE-13742.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Wed Sep 6 05:33:35 2017 New Revision: 75770 URL:
http://svn.reactos.org/svn/reactos?rev=75770&view=rev
Log: [Shell32] - Patch by Fabian Maurer : Draw text on message boxes without background. - Fixes CORE-13742. Modified: trunk/reactos/dll/win32/shell32/shlfileop.cpp Modified: trunk/reactos/dll/win32/shell32/shlfileop.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shlfileo…
============================================================================== --- trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shlfileop.cpp [iso-8859-1] Wed Sep 6 05:33:35 2017 @@ -130,6 +130,7 @@ BeginPaint(hDlg, &ps); hdc = ps.hdc; + SetBkMode(hdc, TRANSPARENT); GetClientRect(GetDlgItem(hDlg, IDC_YESTOALL_MESSAGE), &r); /* this will remap the rect to dialog coords */
7 years, 3 months
1
0
0
0
[pschweitzer] 75769: [PSDK] Define FSCTL_MARK_VOLUME_DIRTY. This fixes build (erm)
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Sep 5 19:19:22 2017 New Revision: 75769 URL:
http://svn.reactos.org/svn/reactos?rev=75769&view=rev
Log: [PSDK] Define FSCTL_MARK_VOLUME_DIRTY. This fixes build (erm) Modified: trunk/reactos/sdk/include/psdk/winioctl.h Modified: trunk/reactos/sdk/include/psdk/winioctl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/winioctl.…
============================================================================== --- trunk/reactos/sdk/include/psdk/winioctl.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/winioctl.h [iso-8859-1] Tue Sep 5 19:19:22 2017 @@ -630,6 +630,7 @@ #ifndef _FILESYSTEMFSCTL_ #define _FILESYSTEMFSCTL_ +#define FSCTL_MARK_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 12, METHOD_BUFFERED, FILE_ANY_ACCESS) #if (_WIN32_WINNT >= _WIN32_WINNT_NT4) #define FSCTL_IS_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS) #endif
7 years, 3 months
1
0
0
0
[pschweitzer] 75768: [FSUTIL] Implement setting the dirty bit (fsutil dirty set) on a volume. This doesn't allow to trigger a chkdsk on reboot with ReactOS, because of the way we handle the dirty b...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Sep 5 19:11:02 2017 New Revision: 75768 URL:
http://svn.reactos.org/svn/reactos?rev=75768&view=rev
Log: [FSUTIL] Implement setting the dirty bit (fsutil dirty set) on a volume. This doesn't allow to trigger a chkdsk on reboot with ReactOS, because of the way we handle the dirty bit in our FAT implementation is a bit... weird. This works on W2K3 though! Modified: trunk/reactos/base/applications/cmdutils/fsutil/dirty.c Modified: trunk/reactos/base/applications/cmdutils/fsutil/dirty.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/dirty.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/dirty.c [iso-8859-1] Tue Sep 5 19:11:02 2017 @@ -60,15 +60,50 @@ /* Print the status */ _ftprintf(stdout, _T("The %s volume is %s\n"), argv[1], (VolumeStatus & VOLUME_IS_DIRTY ? _T("dirty") : _T("clean"))); - return 1; + return 0; } static int SetMain(int argc, const TCHAR *argv[]) { - /* FIXME */ - _ftprintf(stderr, _T("Not implemented\n")); - return 1; + HANDLE Volume; + DWORD BytesRead; + TCHAR VolumeID[PATH_MAX]; + + /* We need a volume (letter or GUID) */ + if (argc < 2) + { + _ftprintf(stderr, _T("Usage: fsutil dirty set <volume>\n")); + _ftprintf(stderr, _T("\tFor example: fsutil dirty set c:\n")); + return 1; + } + + /* Create full name */ + _stprintf(VolumeID, _T("\\\\.\\%s"), argv[1]); + + /* Open the volume */ + Volume = CreateFile(VolumeID, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (Volume == INVALID_HANDLE_VALUE) + { + _ftprintf(stderr, _T("Error: %d\n"), GetLastError()); + return 1; + } + + /* And set the dirty bit */ + if (DeviceIoControl(Volume, FSCTL_MARK_VOLUME_DIRTY, NULL, 0, NULL, 0, &BytesRead, NULL) == FALSE) + { + _ftprintf(stderr, _T("Error: %d\n"), GetLastError()); + CloseHandle(Volume); + return 1; + } + + CloseHandle(Volume); + + /* Print the status */ + _ftprintf(stdout, _T("The %s volume is now marked as dirty\n"), argv[1]); + + return 0; } static void
7 years, 3 months
1
0
0
0
[pschweitzer] 75767: [FASTFAT] Fix a bug: - IRP information was never set in VfatIsVolumeDirty() and thus dirty status was never copied back to the caller
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Sep 5 19:08:01 2017 New Revision: 75767 URL:
http://svn.reactos.org/svn/reactos?rev=75767&view=rev
Log: [FASTFAT] Fix a bug: - IRP information was never set in VfatIsVolumeDirty() and thus dirty status was never copied back to the caller Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat/fsctl.c [iso-8859-1] Tue Sep 5 19:08:01 2017 @@ -1021,6 +1021,8 @@ *Flags |= VOLUME_IS_DIRTY; } + IrpContext->Irp->IoStatus.Information = sizeof(ULONG); + return STATUS_SUCCESS; }
7 years, 3 months
1
0
0
0
[pschweitzer] 75766: [FSUTIL] Avoid code duplication++
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Sep 5 13:24:00 2017 New Revision: 75766 URL:
http://svn.reactos.org/svn/reactos?rev=75766&view=rev
Log: [FSUTIL] Avoid code duplication++ Modified: trunk/reactos/base/applications/cmdutils/fsutil/common.c trunk/reactos/base/applications/cmdutils/fsutil/dirty.c trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h Modified: trunk/reactos/base/applications/cmdutils/fsutil/common.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/common.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/common.c [iso-8859-1] Tue Sep 5 13:24:00 2017 @@ -45,3 +45,24 @@ return ret; } + +void PrintDefaultUsage(const TCHAR * Command, + const TCHAR * SubCommand, + HandlerItem * HandlersList, + int HandlerListCount) +{ + int i; + + /* If we were given a command, print it's not supported */ + if (SubCommand != NULL) + { + _ftprintf(stderr, _T("Unhandled%scommand: %s\n"), Command, SubCommand); + } + + /* And dump any available command */ + _ftprintf(stderr, _T("---- Handled%scommands ----\n\n"), Command); + for (i = 0; i < HandlerListCount; ++i) + { + _ftprintf(stderr, _T("%s\t%s\n"), HandlersList[i].Command, HandlersList[i].Desc); + } +} Modified: trunk/reactos/base/applications/cmdutils/fsutil/dirty.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/dirty.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/dirty.c [iso-8859-1] Tue Sep 5 13:24:00 2017 @@ -74,20 +74,8 @@ static void PrintUsage(const TCHAR * Command) { - int i; - - /* If we were given a command, print it's not supported */ - if (Command != NULL) - { - _ftprintf(stderr, _T("Unhandled DIRTY command: %s\n"), Command); - } - - /* And dump any available command */ - _ftprintf(stderr, _T("---- Handled DIRTY commands ----\n\n")); - for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) - { - _ftprintf(stderr, _T("%s\t%s\n"), HandlersList[i].Command, HandlersList[i].Desc); - } + PrintDefaultUsage(_T(" DIRTY "), Command, (HandlerItem *)&HandlersList, + (sizeof(HandlersList) / sizeof(HandlersList[0]))); } int Modified: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c [iso-8859-1] Tue Sep 5 13:24:00 2017 @@ -19,20 +19,8 @@ static void PrintUsage(const TCHAR * Command) { - int i; - - /* If we were given a command, print it's not supported */ - if (Command != NULL) - { - _ftprintf(stderr, _T("Unhandled command: %s\n"), Command); - } - - /* And dump any available command */ - _ftprintf(stderr, _T("---- Handled commands ----\n\n")); - for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) - { - _ftprintf(stderr, _T("%s\t%s\n"), HandlersList[i].Command, HandlersList[i].Desc); - } + PrintDefaultUsage(_T(" "), Command, (HandlerItem *)&HandlersList, + (sizeof(HandlersList) / sizeof(HandlersList[0]))); } int Modified: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h [iso-8859-1] Tue Sep 5 13:24:00 2017 @@ -18,4 +18,9 @@ int HandlerListCount, void (*UsageHelper)(const TCHAR *)); +void PrintDefaultUsage(const TCHAR * Command, + const TCHAR * SubCommand, + HandlerItem * HandlersList, + int HandlerListCount); + #endif
7 years, 3 months
1
0
0
0
[pschweitzer] 75765: [FSUTIL] Avoid code duplication
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Sep 5 13:10:16 2017 New Revision: 75765 URL:
http://svn.reactos.org/svn/reactos?rev=75765&view=rev
Log: [FSUTIL] Avoid code duplication Added: trunk/reactos/base/applications/cmdutils/fsutil/common.c (with props) Modified: trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt trunk/reactos/base/applications/cmdutils/fsutil/dirty.c trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h Modified: trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt [iso-8859-1] Tue Sep 5 13:10:16 2017 @@ -1,4 +1,5 @@ list(APPEND SOURCE + common.c dirty.c fsutil.c fsutil.h) Added: trunk/reactos/base/applications/cmdutils/fsutil/common.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/common.c (added) +++ trunk/reactos/base/applications/cmdutils/fsutil/common.c [iso-8859-1] Tue Sep 5 13:10:16 2017 @@ -0,0 +1,47 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS FS utility tool + * FILE: base/applications/cmdutils/common.c + * PURPOSE: FSutil common functions + * PROGRAMMERS: Pierre Schweitzer <pierre(a)reactos.org> + */ + +#include "fsutil.h" + +int FindHandler(int argc, + const TCHAR *argv[], + HandlerItem * HandlersList, + int HandlerListCount, + void (*UsageHelper)(const TCHAR *)) +{ + int i; + int ret; + const TCHAR * Command; + + ret = 1; + Command = NULL; + i = HandlerListCount; + + /* If we have a command, does it match a known one? */ + if (argc > 1) + { + /* Browse all the known commands finding the right one */ + Command = argv[1]; + for (i = 0; i < HandlerListCount; ++i) + { + if (_tcsicmp(Command, HandlersList[i].Command) == 0) + { + ret = HandlersList[i].Handler(argc - 1, &argv[1]); + break; + } + } + } + + /* We failed finding someone to handle the caller's needs, print out */ + if (i == HandlerListCount) + { + UsageHelper(Command); + } + + return ret; +} Propchange: trunk/reactos/base/applications/cmdutils/fsutil/common.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/applications/cmdutils/fsutil/dirty.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/dirty.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/dirty.c [iso-8859-1] Tue Sep 5 13:10:16 2017 @@ -93,34 +93,7 @@ int DirtyMain(int argc, const TCHAR *argv[]) { - int i; - int ret; - const TCHAR * Command; - - ret = 1; - Command = NULL; - i = (sizeof(HandlersList) / sizeof(HandlersList[0])); - - /* If we have a command, does it match a known one? */ - if (argc > 1) - { - /* Browse all the known commands finding the right one */ - Command = argv[1]; - for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) - { - if (_tcsicmp(Command, HandlersList[i].Command) == 0) - { - ret = HandlersList[i].Handler(argc - 1, &argv[1]); - break; - } - } - } - - /* We failed finding someone to handle the caller's needs, print out */ - if (i == (sizeof(HandlersList) / sizeof(HandlersList[0]))) - { - PrintUsage(Command); - } - - return ret; + return FindHandler(argc, argv, (HandlerItem *)&HandlersList, + (sizeof(HandlersList) / sizeof(HandlersList[0])), + PrintUsage); } Modified: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c [iso-8859-1] Tue Sep 5 13:10:16 2017 @@ -39,34 +39,7 @@ __cdecl _tmain(int argc, const TCHAR *argv[]) { - int i; - int ret; - const TCHAR * Command; - - ret = 1; - Command = NULL; - i = (sizeof(HandlersList) / sizeof(HandlersList[0])); - - /* If we have a command, does it match a known one? */ - if (argc > 1) - { - /* Browse all the known commands finding the right one */ - Command = argv[1]; - for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) - { - if (_tcsicmp(Command, HandlersList[i].Command) == 0) - { - ret = HandlersList[i].Handler(argc - 1, &argv[1]); - break; - } - } - } - - /* We failed finding someone to handle the caller's needs, print out */ - if (i == (sizeof(HandlersList) / sizeof(HandlersList[0]))) - { - PrintUsage(Command); - } - - return ret; + return FindHandler(argc, argv, (HandlerItem *)&HandlersList, + (sizeof(HandlersList) / sizeof(HandlersList[0])), + PrintUsage); } Modified: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h [iso-8859-1] Tue Sep 5 13:10:16 2017 @@ -12,4 +12,10 @@ const TCHAR * Desc; } HandlerItem; +int FindHandler(int argc, + const TCHAR *argv[], + HandlerItem * HandlersList, + int HandlerListCount, + void (*UsageHelper)(const TCHAR *)); + #endif
7 years, 3 months
1
0
0
0
[pschweitzer] 75764: [FSUTIL] Add a skeleton for the fsutil tool. As a proof of concept, implement fsutil dirty query. More to follow ; -).
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Sep 5 12:56:45 2017 New Revision: 75764 URL:
http://svn.reactos.org/svn/reactos?rev=75764&view=rev
Log: [FSUTIL] Add a skeleton for the fsutil tool. As a proof of concept, implement fsutil dirty query. More to follow ;-). Added: trunk/reactos/base/applications/cmdutils/fsutil/ trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt (with props) trunk/reactos/base/applications/cmdutils/fsutil/dirty.c (with props) trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c (with props) trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h (with props) trunk/reactos/base/applications/cmdutils/fsutil/fsutil.rc (with props) Modified: trunk/reactos/base/applications/cmdutils/CMakeLists.txt Modified: trunk/reactos/base/applications/cmdutils/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/cmdutils/CMakeLists.txt [iso-8859-1] Tue Sep 5 12:56:45 2017 @@ -6,6 +6,7 @@ add_subdirectory(doskey) add_subdirectory(eventcreate) add_subdirectory(find) +add_subdirectory(fsutil) add_subdirectory(help) add_subdirectory(hostname) add_subdirectory(lodctr) Added: trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt (added) +++ trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt [iso-8859-1] Tue Sep 5 12:56:45 2017 @@ -0,0 +1,9 @@ +list(APPEND SOURCE + dirty.c + fsutil.c + fsutil.h) +add_executable(fsutil ${SOURCE} fsutil.rc) +set_module_type(fsutil win32cui UNICODE) +add_importlibs(fsutil msvcrt kernel32 ntdll) +add_pch(fsutil fsutil.h SOURCE) +add_cd_file(TARGET fsutil DESTINATION reactos/system32 FOR all) Propchange: trunk/reactos/base/applications/cmdutils/fsutil/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/cmdutils/fsutil/dirty.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/dirty.c (added) +++ trunk/reactos/base/applications/cmdutils/fsutil/dirty.c [iso-8859-1] Tue Sep 5 12:56:45 2017 @@ -0,0 +1,126 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS FS utility tool + * FILE: base/applications/cmdutils/dirty.c + * PURPOSE: FSutil dirty bit handling + * PROGRAMMERS: Pierre Schweitzer <pierre(a)reactos.org> + */ + +#include "fsutil.h" +#include <winioctl.h> + +/* Add handlers here for subcommands */ +static int QueryMain(int argc, const TCHAR *argv[]); +static int SetMain(int argc, const TCHAR *argv[]); +static HandlerItem HandlersList[] = +{ + /* Proc, name, help */ + { QueryMain, _T("query"), _T("Show the dirty bit") }, + { SetMain, _T("set"), _T("Set the dirty bit") }, +}; + +static int +QueryMain(int argc, const TCHAR *argv[]) +{ + HANDLE Volume; + TCHAR VolumeID[PATH_MAX]; + ULONG VolumeStatus, BytesRead; + + /* We need a volume (letter or GUID) */ + if (argc < 2) + { + _ftprintf(stderr, _T("Usage: fsutil dirty query <volume>\n")); + _ftprintf(stderr, _T("\tFor example: fsutil dirty query c:\n")); + return 1; + } + + /* Create full name */ + _stprintf(VolumeID, _T("\\\\.\\%s"), argv[1]); + + /* Open the volume */ + Volume = CreateFile(VolumeID, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (Volume == INVALID_HANDLE_VALUE) + { + _ftprintf(stderr, _T("Error: %d\n"), GetLastError()); + return 1; + } + + /* And query the dirty status */ + if (DeviceIoControl(Volume, FSCTL_IS_VOLUME_DIRTY, NULL, 0, &VolumeStatus, + sizeof(ULONG), &BytesRead, NULL) == FALSE) + { + _ftprintf(stderr, _T("Error: %d\n"), GetLastError()); + CloseHandle(Volume); + return 1; + } + + CloseHandle(Volume); + + /* Print the status */ + _ftprintf(stdout, _T("The %s volume is %s\n"), argv[1], (VolumeStatus & VOLUME_IS_DIRTY ? _T("dirty") : _T("clean"))); + + return 1; +} + +static int +SetMain(int argc, const TCHAR *argv[]) +{ + /* FIXME */ + _ftprintf(stderr, _T("Not implemented\n")); + return 1; +} + +static void +PrintUsage(const TCHAR * Command) +{ + int i; + + /* If we were given a command, print it's not supported */ + if (Command != NULL) + { + _ftprintf(stderr, _T("Unhandled DIRTY command: %s\n"), Command); + } + + /* And dump any available command */ + _ftprintf(stderr, _T("---- Handled DIRTY commands ----\n\n")); + for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) + { + _ftprintf(stderr, _T("%s\t%s\n"), HandlersList[i].Command, HandlersList[i].Desc); + } +} + +int +DirtyMain(int argc, const TCHAR *argv[]) +{ + int i; + int ret; + const TCHAR * Command; + + ret = 1; + Command = NULL; + i = (sizeof(HandlersList) / sizeof(HandlersList[0])); + + /* If we have a command, does it match a known one? */ + if (argc > 1) + { + /* Browse all the known commands finding the right one */ + Command = argv[1]; + for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) + { + if (_tcsicmp(Command, HandlersList[i].Command) == 0) + { + ret = HandlersList[i].Handler(argc - 1, &argv[1]); + break; + } + } + } + + /* We failed finding someone to handle the caller's needs, print out */ + if (i == (sizeof(HandlersList) / sizeof(HandlersList[0]))) + { + PrintUsage(Command); + } + + return ret; +} Propchange: trunk/reactos/base/applications/cmdutils/fsutil/dirty.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c (added) +++ trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c [iso-8859-1] Tue Sep 5 12:56:45 2017 @@ -0,0 +1,72 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS FS utility tool + * FILE: base/applications/cmdutils/fsutil.c + * PURPOSE: FSutil main + * PROGRAMMERS: Pierre Schweitzer <pierre(a)reactos.org> + */ + +#include "fsutil.h" + +/* Add handlers here for commands */ +int DirtyMain(int argc, const TCHAR *argv[]); +static HandlerItem HandlersList[] = +{ + /* Proc, name, help */ + { DirtyMain, _T("dirty"), _T("Manipulates the dirty bit") }, +}; + +static void +PrintUsage(const TCHAR * Command) +{ + int i; + + /* If we were given a command, print it's not supported */ + if (Command != NULL) + { + _ftprintf(stderr, _T("Unhandled command: %s\n"), Command); + } + + /* And dump any available command */ + _ftprintf(stderr, _T("---- Handled commands ----\n\n")); + for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) + { + _ftprintf(stderr, _T("%s\t%s\n"), HandlersList[i].Command, HandlersList[i].Desc); + } +} + +int +__cdecl +_tmain(int argc, const TCHAR *argv[]) +{ + int i; + int ret; + const TCHAR * Command; + + ret = 1; + Command = NULL; + i = (sizeof(HandlersList) / sizeof(HandlersList[0])); + + /* If we have a command, does it match a known one? */ + if (argc > 1) + { + /* Browse all the known commands finding the right one */ + Command = argv[1]; + for (i = 0; i < (sizeof(HandlersList) / sizeof(HandlersList[0])); ++i) + { + if (_tcsicmp(Command, HandlersList[i].Command) == 0) + { + ret = HandlersList[i].Handler(argc - 1, &argv[1]); + break; + } + } + } + + /* We failed finding someone to handle the caller's needs, print out */ + if (i == (sizeof(HandlersList) / sizeof(HandlersList[0]))) + { + PrintUsage(Command); + } + + return ret; +} Propchange: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h (added) +++ trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h [iso-8859-1] Tue Sep 5 12:56:45 2017 @@ -0,0 +1,15 @@ +#ifndef __FSUTIL_H__ +#define __FSUTIL_H__ + +#include <windows.h> +#include <tchar.h> +#include <stdio.h> + +typedef struct +{ + int (*Handler)(int argc, const TCHAR *argv[]); + const TCHAR * Command; + const TCHAR * Desc; +} HandlerItem; + +#endif Propchange: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.h ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
============================================================================== --- trunk/reactos/base/applications/cmdutils/fsutil/fsutil.rc (added) +++ trunk/reactos/base/applications/cmdutils/fsutil/fsutil.rc [iso-8859-1] Tue Sep 5 12:56:45 2017 @@ -0,0 +1,4 @@ +#define REACTOS_STR_FILE_DESCRIPTION "FS utility\0" +#define REACTOS_STR_INTERNAL_NAME "fsutil\0" +#define REACTOS_STR_ORIGINAL_FILENAME "fsutil.exe\0" +#include <reactos/version.rc> Propchange: trunk/reactos/base/applications/cmdutils/fsutil/fsutil.rc ------------------------------------------------------------------------------ svn:eol-style = native
7 years, 3 months
1
0
0
0
[pschweitzer] 75763: [PSDK] Add FSCTL for dirty bit read
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Tue Sep 5 12:51:08 2017 New Revision: 75763 URL:
http://svn.reactos.org/svn/reactos?rev=75763&view=rev
Log: [PSDK] Add FSCTL for dirty bit read Modified: trunk/reactos/sdk/include/psdk/winioctl.h Modified: trunk/reactos/sdk/include/psdk/winioctl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/winioctl.…
============================================================================== --- trunk/reactos/sdk/include/psdk/winioctl.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/winioctl.h [iso-8859-1] Tue Sep 5 12:51:08 2017 @@ -627,6 +627,21 @@ ((t)==PARTITION_EXTENDED)||\ ((t)==PARTITION_XINT13_EXTENDED)) +#ifndef _FILESYSTEMFSCTL_ +#define _FILESYSTEMFSCTL_ + +#if (_WIN32_WINNT >= _WIN32_WINNT_NT4) +#define FSCTL_IS_VOLUME_DIRTY CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 30, METHOD_BUFFERED, FILE_ANY_ACCESS) +#endif + +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) +#define VOLUME_IS_DIRTY (0x00000001) +#define VOLUME_UPGRADE_SCHEDULED (0x00000002) +#define VOLUME_SESSION_OPEN (0x00000004) +#endif + +#endif + #ifdef _MSC_VER #pragma warning(pop) #endif
7 years, 3 months
1
0
0
0
[hbelusca] 75762: [USETUP]: Move the SetupExtractFile() function to where it is (only) used.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Mon Sep 4 20:00:22 2017 New Revision: 75762 URL:
http://svn.reactos.org/svn/reactos?rev=75762&view=rev
Log: [USETUP]: Move the SetupExtractFile() function to where it is (only) used. Modified: branches/setup_improvements/base/setup/usetup/filequeue.c branches/setup_improvements/base/setup/usetup/filequeue.h branches/setup_improvements/base/setup/usetup/filesup.c branches/setup_improvements/base/setup/usetup/filesup.h Modified: branches/setup_improvements/base/setup/usetup/filequeue.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
============================================================================== --- branches/setup_improvements/base/setup/usetup/filequeue.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/filequeue.c [iso-8859-1] Mon Sep 4 20:00:22 2017 @@ -57,6 +57,90 @@ /* FUNCTIONS ****************************************************************/ +#ifdef __REACTOS__ +static BOOLEAN HasCurrentCabinet = FALSE; +static WCHAR CurrentCabinetName[MAX_PATH]; +static CAB_SEARCH Search; + +NTSTATUS +SetupExtractFile( + PWCHAR CabinetFileName, + PWCHAR SourceFileName, + PWCHAR DestinationPathName) +{ + ULONG CabStatus; + + DPRINT("SetupExtractFile(CabinetFileName %S, SourceFileName %S, DestinationPathName %S)\n", + CabinetFileName, SourceFileName, DestinationPathName); + + if (HasCurrentCabinet) + { + DPRINT("CurrentCabinetName: %S\n", CurrentCabinetName); + } + + if ((HasCurrentCabinet) && (wcscmp(CabinetFileName, CurrentCabinetName) == 0)) + { + DPRINT("Using same cabinet as last time\n"); + + /* Use our last location because the files should be sequential */ + CabStatus = CabinetFindNextFileSequential(SourceFileName, &Search); + if (CabStatus != CAB_STATUS_SUCCESS) + { + DPRINT("Sequential miss on file: %S\n", SourceFileName); + + /* Looks like we got unlucky */ + CabStatus = CabinetFindFirst(SourceFileName, &Search); + } + } + else + { + DPRINT("Using new cabinet\n"); + + if (HasCurrentCabinet) + { + CabinetCleanup(); + } + + wcscpy(CurrentCabinetName, CabinetFileName); + + CabinetInitialize(); + CabinetSetEventHandlers(NULL, NULL, NULL); + CabinetSetCabinetName(CabinetFileName); + + CabStatus = CabinetOpen(); + if (CabStatus == CAB_STATUS_SUCCESS) + { + DPRINT("Opened cabinet %S\n", CabinetGetCabinetName()); + HasCurrentCabinet = TRUE; + } + else + { + DPRINT("Cannot open cabinet (%d)\n", CabStatus); + return STATUS_UNSUCCESSFUL; + } + + /* We have to start at the beginning here */ + CabStatus = CabinetFindFirst(SourceFileName, &Search); + } + + if (CabStatus != CAB_STATUS_SUCCESS) + { + DPRINT1("Unable to find '%S' in cabinet '%S'\n", SourceFileName, CabinetGetCabinetName()); + return STATUS_UNSUCCESSFUL; + } + + CabinetSetDestinationPath(DestinationPathName); + CabStatus = CabinetExtractFile(&Search); + if (CabStatus != CAB_STATUS_SUCCESS) + { + DPRINT("Cannot extract file %S (%d)\n", SourceFileName, CabStatus); + return STATUS_UNSUCCESSFUL; + } + + return STATUS_SUCCESS; +} +#endif + HSPFILEQ WINAPI SetupOpenFileQueue(VOID) Modified: branches/setup_improvements/base/setup/usetup/filequeue.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
============================================================================== --- branches/setup_improvements/base/setup/usetup/filequeue.h [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/filequeue.h [iso-8859-1] Mon Sep 4 20:00:22 2017 @@ -69,6 +69,12 @@ /* FUNCTIONS ****************************************************************/ +NTSTATUS +SetupExtractFile( + PWCHAR CabinetFileName, + PWCHAR SourceFileName, + PWCHAR DestinationFileName); + HSPFILEQ WINAPI SetupOpenFileQueue(VOID); Modified: branches/setup_improvements/base/setup/usetup/filesup.c URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
============================================================================== --- branches/setup_improvements/base/setup/usetup/filesup.c [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/filesup.c [iso-8859-1] Mon Sep 4 20:00:22 2017 @@ -15,10 +15,6 @@ #include <debug.h> /* FUNCTIONS ****************************************************************/ - -static BOOLEAN HasCurrentCabinet = FALSE; -static WCHAR CurrentCabinetName[MAX_PATH]; -static CAB_SEARCH Search; static NTSTATUS @@ -143,86 +139,6 @@ return Status; } -#ifdef __REACTOS__ -NTSTATUS -SetupExtractFile( - PWCHAR CabinetFileName, - PWCHAR SourceFileName, - PWCHAR DestinationPathName) -{ - ULONG CabStatus; - - DPRINT("SetupExtractFile(CabinetFileName %S, SourceFileName %S, DestinationPathName %S)\n", - CabinetFileName, SourceFileName, DestinationPathName); - - if (HasCurrentCabinet) - { - DPRINT("CurrentCabinetName: %S\n", CurrentCabinetName); - } - - if ((HasCurrentCabinet) && (wcscmp(CabinetFileName, CurrentCabinetName) == 0)) - { - DPRINT("Using same cabinet as last time\n"); - - /* Use our last location because the files should be sequential */ - CabStatus = CabinetFindNextFileSequential(SourceFileName, &Search); - if (CabStatus != CAB_STATUS_SUCCESS) - { - DPRINT("Sequential miss on file: %S\n", SourceFileName); - - /* Looks like we got unlucky */ - CabStatus = CabinetFindFirst(SourceFileName, &Search); - } - } - else - { - DPRINT("Using new cabinet\n"); - - if (HasCurrentCabinet) - { - CabinetCleanup(); - } - - wcscpy(CurrentCabinetName, CabinetFileName); - - CabinetInitialize(); - CabinetSetEventHandlers(NULL, NULL, NULL); - CabinetSetCabinetName(CabinetFileName); - - CabStatus = CabinetOpen(); - if (CabStatus == CAB_STATUS_SUCCESS) - { - DPRINT("Opened cabinet %S\n", CabinetGetCabinetName()); - HasCurrentCabinet = TRUE; - } - else - { - DPRINT("Cannot open cabinet (%d)\n", CabStatus); - return STATUS_UNSUCCESSFUL; - } - - /* We have to start at the beginning here */ - CabStatus = CabinetFindFirst(SourceFileName, &Search); - } - - if (CabStatus != CAB_STATUS_SUCCESS) - { - DPRINT1("Unable to find '%S' in cabinet '%S'\n", SourceFileName, CabinetGetCabinetName()); - return STATUS_UNSUCCESSFUL; - } - - CabinetSetDestinationPath(DestinationPathName); - CabStatus = CabinetExtractFile(&Search); - if (CabStatus != CAB_STATUS_SUCCESS) - { - DPRINT("Cannot extract file %S (%d)\n", SourceFileName, CabStatus); - return STATUS_UNSUCCESSFUL; - } - - return STATUS_SUCCESS; -} -#endif - BOOLEAN IsValidPath( IN PWCHAR InstallDir, Modified: branches/setup_improvements/base/setup/usetup/filesup.h URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
============================================================================== --- branches/setup_improvements/base/setup/usetup/filesup.h [iso-8859-1] (original) +++ branches/setup_improvements/base/setup/usetup/filesup.h [iso-8859-1] Mon Sep 4 20:00:22 2017 @@ -13,12 +13,6 @@ SetupCreateDirectory( PWCHAR DirectoryName); -NTSTATUS -SetupExtractFile( - PWCHAR CabinetFileName, - PWCHAR SourceFileName, - PWCHAR DestinationFileName); - BOOLEAN IsValidPath( IN PWCHAR InstallDir,
7 years, 3 months
1
0
0
0
[ashaposhnikov] 75761: [RAPPS] Merged two Installed and Available enum values into one enum
by ashaposhnikov@svn.reactos.org
Author: ashaposhnikov Date: Sun Sep 3 21:10:24 2017 New Revision: 75761 URL:
http://svn.reactos.org/svn/reactos?rev=75761&view=rev
Log: [RAPPS] Merged two Installed and Available enum values into one enum Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/installed.h branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/gui.cpp [iso-8859-1] Sun Sep 3 21:10:24 2017 @@ -923,7 +923,7 @@ FreeLogs(); m_AvailableApps.FreeCachedEntries(); - if (IS_INSTALLED_ENUM(SelectedEnumType)) + if (IsInstalledEnum(SelectedEnumType)) FreeInstalledAppList(); delete m_ClientPanel; @@ -953,7 +953,7 @@ break; case IDS_APPLICATIONS: - UpdateApplicationsList(ENUM_APPLICATIONS); + UpdateApplicationsList(ENUM_INSTALLED_APPLICATIONS); break; case IDS_UPDATES: @@ -1087,7 +1087,7 @@ (pnic->uNewState & LVIS_FOCUSED) && !(pnic->uOldState & LVIS_FOCUSED)) { - if (IS_INSTALLED_ENUM(SelectedEnumType)) + if (IsInstalledEnum(SelectedEnumType)) ShowInstalledAppInfo(ItemIndex); if (IsAvailableEnum(SelectedEnumType)) CAvailableAppView::ShowAvailableAppInfo(ItemIndex); @@ -1125,7 +1125,7 @@ { if (data->hwndFrom == m_ListView->m_hWnd && ((LPNMLISTVIEW) lParam)->iItem != -1) { - if (IS_INSTALLED_ENUM(SelectedEnumType)) + if (IsInstalledEnum(SelectedEnumType)) ShowInstalledAppInfo(-1); if (IsAvailableEnum(SelectedEnumType)) CAvailableAppView::ShowAvailableAppInfo(-1); @@ -1502,7 +1502,7 @@ { ATL::CStringW szBuffer1, szBuffer2; HIMAGELIST hImageListView; - BOOL bWasInInstalled = IS_INSTALLED_ENUM(SelectedEnumType); + BOOL bWasInInstalled = IsInstalledEnum(SelectedEnumType); bUpdating = TRUE; m_ListView->SetRedraw(FALSE); @@ -1533,7 +1533,7 @@ ImageList_Destroy(hImageListBuf); } - if (IS_INSTALLED_ENUM(EnumType)) + if (IsInstalledEnum(EnumType)) { if (!bWasInInstalled) { Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/available.h [iso-8859-1] Sun Sep 3 21:10:24 2017 @@ -6,34 +6,6 @@ #include <atlcoll.h> #include "misc.h" - -/* EnumType flags for EnumAvailableApplications */ -enum AvailableCategories -{ - ENUM_ALL_AVAILABLE, - ENUM_CAT_AUDIO, - ENUM_CAT_VIDEO, - ENUM_CAT_GRAPHICS, - ENUM_CAT_GAMES, - ENUM_CAT_INTERNET, - ENUM_CAT_OFFICE, - ENUM_CAT_DEVEL, - ENUM_CAT_EDU, - ENUM_CAT_ENGINEER, - ENUM_CAT_FINANCE, - ENUM_CAT_SCIENCE, - ENUM_CAT_TOOLS, - ENUM_CAT_DRIVERS, - ENUM_CAT_LIBS, - ENUM_CAT_OTHER, - ENUM_AVAILABLE_MIN = ENUM_ALL_AVAILABLE, - ENUM_AVAILABLE_MAX = ENUM_CAT_OTHER -}; - -inline BOOL IsAvailableEnum(INT x) -{ - return (x >= AvailableCategories::ENUM_AVAILABLE_MIN && x <= AvailableCategories::ENUM_AVAILABLE_MAX); -} enum LicenseType { Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/defines.h [iso-8859-1] Sun Sep 3 21:10:24 2017 @@ -31,4 +31,40 @@ #define APPLICATION_DATABASE_URL L"
https://svn.reactos.org/packages/rappmgr.cab
" #define MAX_STR_LEN 256 -#define ENUM_ALL_COMPONENTS 30 + +enum AppsCategories +{ + ENUM_ALL_AVAILABLE, + ENUM_CAT_AUDIO, + ENUM_CAT_VIDEO, + ENUM_CAT_GRAPHICS, + ENUM_CAT_GAMES, + ENUM_CAT_INTERNET, + ENUM_CAT_OFFICE, + ENUM_CAT_DEVEL, + ENUM_CAT_EDU, + ENUM_CAT_ENGINEER, + ENUM_CAT_FINANCE, + ENUM_CAT_SCIENCE, + ENUM_CAT_TOOLS, + ENUM_CAT_DRIVERS, + ENUM_CAT_LIBS, + ENUM_CAT_OTHER, + ENUM_ALL_INSTALLED, + ENUM_INSTALLED_APPLICATIONS = 31, + ENUM_UPDATES = 32, + ENUM_INSTALLED_MIN = ENUM_ALL_INSTALLED, + ENUM_INSTALLED_MAX = ENUM_UPDATES, + ENUM_AVAILABLE_MIN = ENUM_ALL_AVAILABLE, + ENUM_AVAILABLE_MAX = ENUM_CAT_OTHER, +}; + +inline BOOL IsAvailableEnum(INT x) +{ + return (x >= AppsCategories::ENUM_AVAILABLE_MIN && x <= AppsCategories::ENUM_AVAILABLE_MAX); +} + +inline BOOL IsInstalledEnum(INT x) +{ + return (x >= AppsCategories::ENUM_INSTALLED_MIN && x <= AppsCategories::ENUM_INSTALLED_MAX); +} Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/installed.h URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/installed.h [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/include/installed.h [iso-8859-1] Sun Sep 3 21:10:24 2017 @@ -2,14 +2,6 @@ #include <windef.h> #include <atlstr.h> - -#define ENUM_APPLICATIONS 31 -#define ENUM_UPDATES 32 - -#define ENUM_INSTALLED_MIN ENUM_ALL_COMPONENTS -#define ENUM_INSTALLED_MAX ENUM_UPDATES - -#define IS_INSTALLED_ENUM(a) (a >= ENUM_INSTALLED_MIN && a <= ENUM_INSTALLED_MAX) struct INSTALLED_INFO { Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/installed.cpp [iso-8859-1] Sun Sep 3 21:10:24 2017 @@ -54,7 +54,7 @@ HKEY hKey; PINSTALLED_INFO ItemInfo; - if (!IS_INSTALLED_ENUM(SelectedEnumType)) + if (!IsInstalledEnum(SelectedEnumType)) return FALSE; if (Index == -1) @@ -146,7 +146,7 @@ ATL::CStringW szMsgText, szMsgTitle; INT ItemIndex = SendMessageW(hListView, LVM_GETNEXTITEM, -1, LVNI_FOCUSED); - if (!IS_INSTALLED_ENUM(SelectedEnumType)) + if (!IsInstalledEnum(SelectedEnumType)) return; Info = (PINSTALLED_INFO) ListViewGetlParam(Index); @@ -238,13 +238,13 @@ &dwSize) == ERROR_SUCCESS) { szDisplayName.ReleaseBuffer(); - if (EnumType < ENUM_ALL_COMPONENTS || EnumType > ENUM_UPDATES) - EnumType = ENUM_ALL_COMPONENTS; + if (EnumType < ENUM_ALL_INSTALLED || EnumType > ENUM_UPDATES) + EnumType = ENUM_ALL_INSTALLED; if (!bIsSystemComponent) { - if ((EnumType == ENUM_ALL_COMPONENTS) || /* All components */ - ((EnumType == ENUM_APPLICATIONS) && (!bIsUpdate)) || /* Applications only */ + if ((EnumType == ENUM_ALL_INSTALLED) || /* All components */ + ((EnumType == ENUM_INSTALLED_APPLICATIONS) && (!bIsUpdate)) || /* Applications only */ ((EnumType == ENUM_UPDATES) && (bIsUpdate))) /* Updates only */ { if (!lpEnumProc(ItemIndex, szDisplayName, &Info)) Modified: branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2017/rapps/reactos/base/ap…
============================================================================== --- branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp [iso-8859-1] (original) +++ branches/GSoC_2017/rapps/reactos/base/applications/rapps/winmain.cpp [iso-8859-1] Sun Sep 3 21:10:24 2017 @@ -15,7 +15,7 @@ HWND hMainWnd; HINSTANCE hInst; -INT SelectedEnumType = ENUM_ALL_COMPONENTS; +INT SelectedEnumType = ENUM_ALL_INSTALLED; SETTINGS_INFO SettingsInfo; ATL::CStringW szSearchPattern;
7 years, 3 months
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
29
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Results per page:
10
25
50
100
200