2017-09-05 12:56:45 +00:00
|
|
|
/*
|
|
|
|
* 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@reactos.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "fsutil.h"
|
|
|
|
|
|
|
|
/* Add handlers here for commands */
|
2017-09-20 07:50:48 +00:00
|
|
|
HandlerProc DirtyMain;
|
|
|
|
HandlerProc FsInfoMain;
|
|
|
|
HandlerProc HardLinkMain;
|
2017-09-20 08:15:10 +00:00
|
|
|
HandlerProc VolumeMain;
|
2017-09-05 12:56:45 +00:00
|
|
|
static HandlerItem HandlersList[] =
|
|
|
|
{
|
|
|
|
/* Proc, name, help */
|
|
|
|
{ DirtyMain, _T("dirty"), _T("Manipulates the dirty bit") },
|
2017-09-06 15:32:02 +00:00
|
|
|
{ FsInfoMain, _T("fsinfo"), _T("Gathers informations about file systems") },
|
2017-09-08 20:51:16 +00:00
|
|
|
{ HardLinkMain, _T("hardlink"), _T("Handles hard links") },
|
2017-09-20 08:15:10 +00:00
|
|
|
{ VolumeMain, _T("volume"), _T("Manages volumes") },
|
2017-09-05 12:56:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
|
|
|
PrintUsage(const TCHAR * Command)
|
|
|
|
{
|
2017-09-05 13:24:00 +00:00
|
|
|
PrintDefaultUsage(_T(" "), Command, (HandlerItem *)&HandlersList,
|
|
|
|
(sizeof(HandlersList) / sizeof(HandlersList[0])));
|
2017-09-05 12:56:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
|
|
|
__cdecl
|
|
|
|
_tmain(int argc, const TCHAR *argv[])
|
|
|
|
{
|
2017-09-05 13:10:16 +00:00
|
|
|
return FindHandler(argc, argv, (HandlerItem *)&HandlersList,
|
|
|
|
(sizeof(HandlersList) / sizeof(HandlersList[0])),
|
|
|
|
PrintUsage);
|
2017-09-05 12:56:45 +00:00
|
|
|
}
|