ReactOS  0.4.12-dev-102-g4b7f1e0
fsutil.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS FS utility tool
4  * FILE: base/applications/cmdutils/fsutil.c
5  * PURPOSE: FSutil main
6  * PROGRAMMERS: Pierre Schweitzer <pierre@reactos.org>
7  */
8 
9 #include "fsutil.h"
10 
11 /* Add handlers here for commands */
17 {
18  /* Proc, name, help */
19  { DirtyMain, _T("dirty"), _T("Manipulates the dirty bit") },
20  { FsInfoMain, _T("fsinfo"), _T("Gathers informations about file systems") },
21  { HardLinkMain, _T("hardlink"), _T("Handles hard links") },
22  { VolumeMain, _T("volume"), _T("Manages volumes") },
23 };
24 
25 static void
27 {
28  PrintDefaultUsage(_T(" "), Command, (HandlerItem *)&HandlersList,
29  (sizeof(HandlersList) / sizeof(HandlersList[0])));
30 }
31 
32 int
33 __cdecl
34 _tmain(int argc, const TCHAR *argv[])
35 {
36  return FindHandler(argc, argv, (HandlerItem *)&HandlersList,
37  (sizeof(HandlersList) / sizeof(HandlersList[0])),
38  PrintUsage);
39 }
static int argc
Definition: ServiceArgs.c:12
#define __cdecl
Definition: accygwin.h:79
void PrintDefaultUsage(const TCHAR *Command, const TCHAR *SubCommand, HandlerItem *HandlersList, int HandlerListCount)
Definition: common.c:102
int __cdecl _tmain(int argc, const TCHAR *argv[])
Definition: fsutil.c:34
Definition: shell.h:41
static char ** argv
Definition: ServiceArgs.c:11
int FindHandler(int argc, const TCHAR *argv[], HandlerItem *HandlersList, int HandlerListCount, void(*UsageHelper)(const TCHAR *))
Definition: common.c:11
HandlerProc DirtyMain
Definition: fsutil.c:12
static void PrintUsage(const TCHAR *Command)
Definition: fsutil.c:26
char TCHAR
Definition: xmlstorage.h:189
#define _T(x)
Definition: vfdio.h:22
HandlerProc FsInfoMain
Definition: fsutil.c:13
HandlerProc VolumeMain
Definition: fsutil.c:15
int() HandlerProc(int argc, const TCHAR *argv[])
Definition: fsutil.h:8
HandlerProc HardLinkMain
Definition: fsutil.c:14
static HandlerItem HandlersList[]
Definition: fsutil.c:16