ReactOS
0.4.16-dev-258-g81860b4
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 */
12
HandlerProc
DirtyMain
;
13
HandlerProc
FsInfoMain
;
14
HandlerProc
HardLinkMain
;
15
HandlerProc
VolumeMain
;
16
static
HandlerItem
HandlersList
[] =
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
26
PrintUsage
(
const
TCHAR
*
Command
)
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
}
argc
static int argc
Definition:
ServiceArgs.c:12
__cdecl
#define __cdecl
Definition:
accygwin.h:79
DirtyMain
HandlerProc DirtyMain
Definition:
fsutil.c:12
VolumeMain
HandlerProc VolumeMain
Definition:
fsutil.c:15
HardLinkMain
HandlerProc HardLinkMain
Definition:
fsutil.c:14
FsInfoMain
HandlerProc FsInfoMain
Definition:
fsutil.c:13
HandlersList
static HandlerItem HandlersList[]
Definition:
fsutil.c:16
HandlerProc
int() HandlerProc(int argc, const TCHAR *argv[])
Definition:
fsutil.h:8
PrintDefaultUsage
void PrintDefaultUsage(const TCHAR *Command, const TCHAR *SubCommand, HandlerItem *HandlersList, int HandlerListCount)
Definition:
common.c:102
FindHandler
int FindHandler(int argc, const TCHAR *argv[], HandlerItem *HandlersList, int HandlerListCount, void(*UsageHelper)(const TCHAR *))
Definition:
common.c:11
_tmain
#define _tmain
Definition:
tchar.h:497
argv
#define argv
Definition:
mplay32.c:18
PrintUsage
void PrintUsage()
Definition:
nslookup.c:68
fsutil.h
Command
Definition:
shell.h:41
HandlerItem
Definition:
fsutil.h:12
_T
#define _T(x)
Definition:
vfdio.h:22
TCHAR
char TCHAR
Definition:
xmlstorage.h:189
base
applications
cmdutils
fsutil
fsutil.c
Generated on Wed Nov 13 2024 06:02:32 for ReactOS by
1.9.6