ReactOS  0.4.14-dev-599-g2d4d3f5
fsutil.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Setup Library
3  * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4  * PURPOSE: Filesystem support functions
5  * COPYRIGHT: Copyright 2003-2019 Casper S. Hornstrup (chorns@users.sourceforge.net)
6  * Copyright 2017-2019 Hermes Belusca-Maito
7  */
8 
9 #pragma once
10 
11 #include <fmifs/fmifs.h>
12 
14 BOOLEAN
16  IN ULONG Index,
17  OUT PCWSTR* FileSystemName);
18 
21  IN HANDLE PartitionHandle,
22  IN OUT PWSTR FileSystemName,
23  IN SIZE_T FileSystemNameSize);
24 
27  IN PUNICODE_STRING PartitionPath,
28  IN OUT PWSTR FileSystemName,
29  IN SIZE_T FileSystemNameSize);
30 
33  IN PCWSTR Partition,
34  IN OUT PWSTR FileSystemName,
35  IN SIZE_T FileSystemNameSize);
36 
39  IN HANDLE PartitionHandle,
41  IN OUT PWSTR FileSystemName,
42  IN SIZE_T FileSystemNameSize);
43 
46  IN PCWSTR Partition,
48  IN OUT PWSTR FileSystemName,
49  IN SIZE_T FileSystemNameSize);
50 
51 
55  IN PUNICODE_STRING DriveRoot,
56  IN PCWSTR FileSystemName,
59  IN BOOLEAN CheckOnlyIfDirty,
60  IN BOOLEAN ScanDrive,
62 
65  IN PCWSTR DriveRoot,
66  IN PCWSTR FileSystemName,
69  IN BOOLEAN CheckOnlyIfDirty,
70  IN BOOLEAN ScanDrive,
72 
73 
77  IN PUNICODE_STRING DriveRoot,
78  IN PCWSTR FileSystemName,
79  IN FMIFS_MEDIA_FLAG MediaFlag,
84 
87  IN PCWSTR DriveRoot,
88  IN PCWSTR FileSystemName,
89  IN FMIFS_MEDIA_FLAG MediaFlag,
90  IN PCWSTR Label,
94 
95 
96 UCHAR
99  IN PULARGE_INTEGER StartSector,
101 
102 
103 //
104 // Formatting routines
105 //
106 
107 struct _PARTENTRY; // Defined in partlist.h
108 
109 BOOLEAN
111  IN struct _PARTENTRY* PartEntry,
113 
114 /* EOF */
const uint16_t * PCWSTR
Definition: typedefs.h:55
#define IN
Definition: typedefs.h:38
NTSTATUS GetFileSystemName_UStr(IN PUNICODE_STRING PartitionPath, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
Definition: fsutil.c:168
PWCHAR FileSystem
Definition: format.c:72
BOOLEAN PreparePartitionForFormatting(IN struct _PARTENTRY *PartEntry, IN PCWSTR FileSystemName)
Definition: fsutil.c:536
NTSTATUS GetFileSystemNameByHandle(IN HANDLE PartitionHandle, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
Definition: fsutil.c:137
BOOL Verbose
Definition: chkdsk.c:72
uint16_t * PWSTR
Definition: typedefs.h:54
NTSTATUS GetFileSystemName(IN PCWSTR Partition, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
Definition: fsutil.c:211
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS InferFileSystem(IN PCWSTR Partition, IN UCHAR PartitionType, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
Definition: fsutil.c:304
BOOLEAN GetRegisteredFileSystems(IN ULONG Index, OUT PCWSTR *FileSystemName)
Definition: fsutil.c:67
unsigned char BOOLEAN
BOOL QuickFormat
Definition: format.c:66
DWORD ClusterSize
Definition: format.c:67
static const UCHAR Index[8]
Definition: usbohci.c:18
NTSTATUS InferFileSystemByHandle(IN HANDLE PartitionHandle, IN UCHAR PartitionType, IN OUT PWSTR FileSystemName, IN SIZE_T FileSystemNameSize)
Definition: fsutil.c:225
unsigned char UCHAR
Definition: xmlstorage.h:181
UCHAR FileSystemToPartitionType(IN PCWSTR FileSystem, IN PULARGE_INTEGER StartSector, IN PULARGE_INTEGER SectorCount)
Definition: fsutil.c:457
ULONG SectorCount
Definition: part_xbox.c:32
NTSTATUS ChkdskFileSystem(IN PCWSTR DriveRoot, IN PCWSTR FileSystemName, IN BOOLEAN FixErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PFMIFSCALLBACK Callback)
Definition: fsutil.c:378
ULONG_PTR SIZE_T
Definition: typedefs.h:78
BOOLEAN(NTAPI * PFMIFSCALLBACK)(IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)
Definition: fmifs.h:89
BOOL FixErrors
Definition: chkdsk.c:69
NTSTATUS FormatFileSystem(IN PCWSTR DriveRoot, IN PCWSTR FileSystemName, IN FMIFS_MEDIA_FLAG MediaFlag, IN PCWSTR Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
Definition: fsutil.c:431
#define OUT
Definition: typedefs.h:39
CHAR PartitionType
Definition: part_xbox.c:33
NTSTATUS ChkdskFileSystem_UStr(IN PUNICODE_STRING DriveRoot, IN PCWSTR FileSystemName, IN BOOLEAN FixErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PFMIFSCALLBACK Callback)
Definition: fsutil.c:349
unsigned int ULONG
Definition: retypes.h:1
PWCHAR Label
Definition: format.c:70
CHAR FileSystemName[9]
Definition: diskpart.h:99
LPFNPSPCALLBACK Callback
Definition: desk.c:111
FMIFS_MEDIA_FLAG
Definition: fmifs.h:37
NTSTATUS FormatFileSystem_UStr(IN PUNICODE_STRING DriveRoot, IN PCWSTR FileSystemName, IN FMIFS_MEDIA_FLAG MediaFlag, IN PUNICODE_STRING Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
Definition: fsutil.c:402