ReactOS 0.4.15-dev-5664-g3bf4ef6
fmifs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TEXTOUTPUT
 

Typedefs

typedef struct TEXTOUTPUTPTEXTOUTPUT
 
typedef BOOLEAN(NTAPIPFMIFSCALLBACK) (IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)
 
typedef BOOLEAN(NTAPIPULIB_CHKDSK) (IN PUNICODE_STRING DriveRoot, IN PFMIFSCALLBACK Callback, IN BOOLEAN FixErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PVOID pUnknown1, IN PVOID pUnknown2, IN PVOID pUnknown3, IN PVOID pUnknown4, IN PULONG ExitStatus)
 
typedef BOOLEAN(NTAPIPULIB_FORMAT) (IN PUNICODE_STRING DriveRoot, IN PFMIFSCALLBACK Callback, IN BOOLEAN QuickFormat, IN BOOLEAN BackwardCompatible, IN MEDIA_TYPE MediaType, IN PUNICODE_STRING Label, IN ULONG ClusterSize)
 

Enumerations

enum  FMIFS_MEDIA_FLAG {
  FMIFS_UNKNOWN0 , FMIFS_UNKNOWN1 , FMIFS_UNKNOWN2 , FMIFS_UNKNOWN3 ,
  FMIFS_UNKNOWN4 , FMIFS_UNKNOWN5 , FMIFS_UNKNOWN6 , FMIFS_UNKNOWN7 ,
  FMIFS_FLOPPY , FMIFS_UNKNOWN9 , FMIFS_UNKNOWN10 , FMIFS_REMOVABLE ,
  FMIFS_HARDDISK , FMIFS_UNKNOWN13 , FMIFS_UNKNOWN14 , FMIFS_UNKNOWN15 ,
  FMIFS_UNKNOWN16 , FMIFS_UNKNOWN17 , FMIFS_UNKNOWN18 , FMIFS_UNKNOWN19 ,
  FMIFS_UNKNOWN20 , FMIFS_UNKNOWN21 , FMIFS_UNKNOWN22 , FMIFS_UNKNOWN23 ,
  FMIFS_UNKNOWN0 , FMIFS_UNKNOWN1 , FMIFS_UNKNOWN2 , FMIFS_UNKNOWN3 ,
  FMIFS_UNKNOWN4 , FMIFS_UNKNOWN5 , FMIFS_UNKNOWN6 , FMIFS_UNKNOWN7 ,
  FMIFS_FLOPPY , FMIFS_UNKNOWN9 , FMIFS_UNKNOWN10 , FMIFS_REMOVABLE ,
  FMIFS_HARDDISK , FMIFS_UNKNOWN13 , FMIFS_UNKNOWN14 , FMIFS_UNKNOWN15 ,
  FMIFS_UNKNOWN16 , FMIFS_UNKNOWN17 , FMIFS_UNKNOWN18 , FMIFS_UNKNOWN19 ,
  FMIFS_UNKNOWN20 , FMIFS_UNKNOWN21 , FMIFS_UNKNOWN22 , FMIFS_UNKNOWN23
}
 
enum  CALLBACKCOMMAND {
  PROGRESS , DONEWITHSTRUCTURE , UNKNOWN2 , UNKNOWN3 ,
  UNKNOWN4 , UNKNOWN5 , INSUFFICIENTRIGHTS , FSNOTSUPPORTED ,
  VOLUMEINUSE , UNKNOWN9 , UNKNOWNA , DONE ,
  UNKNOWNC , UNKNOWND , OUTPUT , STRUCTUREPROGRESS ,
  CLUSTERSIZETOOSMALL , PROGRESS , DONEWITHSTRUCTURE , UNKNOWN2 ,
  UNKNOWN3 , UNKNOWN4 , UNKNOWN5 , INSUFFICIENTRIGHTS ,
  FSNOTSUPPORTED , VOLUMEINUSE , UNKNOWN9 , UNKNOWNA ,
  DONE , UNKNOWNC , UNKNOWND , OUTPUT ,
  STRUCTUREPROGRESS , CLUSTERSIZETOOSMALL
}
 

Functions

VOID NTAPI Chkdsk (IN PWCHAR DriveRoot, IN PWCHAR Format, IN BOOLEAN CorrectErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PVOID Unused2, IN PVOID Unused3, IN PFMIFSCALLBACK Callback)
 
VOID NTAPI ChkdskEx (IN PWCHAR DriveRoot, IN PWCHAR Format, IN BOOLEAN CorrectErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PVOID Unused2, IN PVOID Unused3, IN PFMIFSCALLBACK Callback)
 
FMIFS_MEDIA_FLAG NTAPI ComputeFmMediaType (IN ULONG MediaType)
 
VOID NTAPI DiskCopy (VOID)
 
BOOLEAN NTAPI EnableVolumeCompression (IN PWCHAR DriveRoot, IN USHORT Compression)
 
VOID NTAPI Format (IN PWCHAR DriveRoot, IN FMIFS_MEDIA_FLAG MediaFlag, IN PWCHAR Format, IN PWCHAR Label, IN BOOLEAN QuickFormat, IN PFMIFSCALLBACK Callback)
 
VOID NTAPI FormatEx (IN PWCHAR DriveRoot, IN FMIFS_MEDIA_FLAG MediaFlag, IN PWCHAR Format, IN PWCHAR Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
 
BOOLEAN NTAPI QueryAvailableFileSystemFormat (IN DWORD Index, IN OUT PWCHAR FileSystem, OUT UCHAR *Major, OUT UCHAR *Minor, OUT BOOLEAN *LatestVersion)
 
BOOL NTAPI QueryDeviceInformation (IN PWCHAR DriveRoot, OUT ULONG *Buffer, IN ULONG BufferSize)
 
BOOL NTAPI QueryFileSystemName (IN PWCHAR DriveRoot, OUT PWCHAR FileSystem OPTIONAL, OUT UCHAR *Unknown2 OPTIONAL, OUT UCHAR *Unknown3 OPTIONAL, OUT ULONG *Unknown4 OPTIONAL)
 
BOOLEAN NTAPI QueryLatestFileSystemVersion (IN PWCHAR FileSystem, OUT UCHAR *Major OPTIONAL, OUT UCHAR *Minor OPTIONAL)
 
BOOL NTAPI QuerySupportedMedia (IN PWCHAR DriveRoot, OUT FMIFS_MEDIA_FLAG *CurrentMedia OPTIONAL, IN ULONG Unknown3, OUT PULONG Unknown4)
 
BOOL NTAPI SetLabel (IN PWCHAR DriveRoot, IN PWCHAR Label)
 

Typedef Documentation

◆ PFMIFSCALLBACK

typedef BOOLEAN(NTAPI * PFMIFSCALLBACK) (IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)

Definition at line 88 of file fmifs.h.

◆ PTEXTOUTPUT

◆ PULIB_CHKDSK

typedef BOOLEAN(NTAPI * PULIB_CHKDSK) (IN PUNICODE_STRING DriveRoot, IN PFMIFSCALLBACK Callback, IN BOOLEAN FixErrors, IN BOOLEAN Verbose, IN BOOLEAN CheckOnlyIfDirty, IN BOOLEAN ScanDrive, IN PVOID pUnknown1, IN PVOID pUnknown2, IN PVOID pUnknown3, IN PVOID pUnknown4, IN PULONG ExitStatus)

Definition at line 200 of file fmifs.h.

◆ PULIB_FORMAT

typedef BOOLEAN(NTAPI * PULIB_FORMAT) (IN PUNICODE_STRING DriveRoot, IN PFMIFSCALLBACK Callback, IN BOOLEAN QuickFormat, IN BOOLEAN BackwardCompatible, IN MEDIA_TYPE MediaType, IN PUNICODE_STRING Label, IN ULONG ClusterSize)

Definition at line 216 of file fmifs.h.

Enumeration Type Documentation

◆ CALLBACKCOMMAND

Enumerator
PROGRESS 
DONEWITHSTRUCTURE 
UNKNOWN2 
UNKNOWN3 
UNKNOWN4 
UNKNOWN5 
INSUFFICIENTRIGHTS 
FSNOTSUPPORTED 
VOLUMEINUSE 
UNKNOWN9 
UNKNOWNA 
DONE 
UNKNOWNC 
UNKNOWND 
OUTPUT 
STRUCTUREPROGRESS 
CLUSTERSIZETOOSMALL 
PROGRESS 
DONEWITHSTRUCTURE 
UNKNOWN2 
UNKNOWN3 
UNKNOWN4 
UNKNOWN5 
INSUFFICIENTRIGHTS 
FSNOTSUPPORTED 
VOLUMEINUSE 
UNKNOWN9 
UNKNOWNA 
DONE 
UNKNOWNC 
UNKNOWND 
OUTPUT 
STRUCTUREPROGRESS 
CLUSTERSIZETOOSMALL 

Definition at line 66 of file fmifs.h.

67{
79 DONE,
82 OUTPUT,
CALLBACKCOMMAND
Definition: fmifs.h:67
@ UNKNOWN9
Definition: fmifs.h:77
@ OUTPUT
Definition: fmifs.h:82
@ FSNOTSUPPORTED
Definition: fmifs.h:75
@ UNKNOWND
Definition: fmifs.h:81
@ VOLUMEINUSE
Definition: fmifs.h:76
@ UNKNOWN4
Definition: fmifs.h:72
@ UNKNOWNA
Definition: fmifs.h:78
@ STRUCTUREPROGRESS
Definition: fmifs.h:83
@ DONE
Definition: fmifs.h:79
@ CLUSTERSIZETOOSMALL
Definition: fmifs.h:84
@ DONEWITHSTRUCTURE
Definition: fmifs.h:69
@ INSUFFICIENTRIGHTS
Definition: fmifs.h:74
@ PROGRESS
Definition: fmifs.h:68
@ UNKNOWN5
Definition: fmifs.h:73
@ UNKNOWN2
Definition: fmifs.h:70
@ UNKNOWN3
Definition: fmifs.h:71
@ UNKNOWNC
Definition: fmifs.h:80

◆ FMIFS_MEDIA_FLAG

Enumerator
FMIFS_UNKNOWN0 
FMIFS_UNKNOWN1 
FMIFS_UNKNOWN2 
FMIFS_UNKNOWN3 
FMIFS_UNKNOWN4 
FMIFS_UNKNOWN5 
FMIFS_UNKNOWN6 
FMIFS_UNKNOWN7 
FMIFS_FLOPPY 
FMIFS_UNKNOWN9 
FMIFS_UNKNOWN10 
FMIFS_REMOVABLE 
FMIFS_HARDDISK 
FMIFS_UNKNOWN13 
FMIFS_UNKNOWN14 
FMIFS_UNKNOWN15 
FMIFS_UNKNOWN16 
FMIFS_UNKNOWN17 
FMIFS_UNKNOWN18 
FMIFS_UNKNOWN19 
FMIFS_UNKNOWN20 
FMIFS_UNKNOWN21 
FMIFS_UNKNOWN22 
FMIFS_UNKNOWN23 
FMIFS_UNKNOWN0 
FMIFS_UNKNOWN1 
FMIFS_UNKNOWN2 
FMIFS_UNKNOWN3 
FMIFS_UNKNOWN4 
FMIFS_UNKNOWN5 
FMIFS_UNKNOWN6 
FMIFS_UNKNOWN7 
FMIFS_FLOPPY 
FMIFS_UNKNOWN9 
FMIFS_UNKNOWN10 
FMIFS_REMOVABLE 
FMIFS_HARDDISK 
FMIFS_UNKNOWN13 
FMIFS_UNKNOWN14 
FMIFS_UNKNOWN15 
FMIFS_UNKNOWN16 
FMIFS_UNKNOWN17 
FMIFS_UNKNOWN18 
FMIFS_UNKNOWN19 
FMIFS_UNKNOWN20 
FMIFS_UNKNOWN21 
FMIFS_UNKNOWN22 
FMIFS_UNKNOWN23 

Definition at line 37 of file fmifs.h.

38{
FMIFS_MEDIA_FLAG
Definition: fmifs.h:38
@ FMIFS_UNKNOWN14
Definition: fmifs.h:53
@ FMIFS_UNKNOWN23
Definition: fmifs.h:62
@ FMIFS_UNKNOWN13
Definition: fmifs.h:52
@ FMIFS_UNKNOWN22
Definition: fmifs.h:61
@ FMIFS_UNKNOWN17
Definition: fmifs.h:56
@ FMIFS_UNKNOWN4
Definition: fmifs.h:43
@ FMIFS_UNKNOWN1
Definition: fmifs.h:40
@ FMIFS_FLOPPY
Definition: fmifs.h:47
@ FMIFS_UNKNOWN3
Definition: fmifs.h:42
@ FMIFS_UNKNOWN10
Definition: fmifs.h:49
@ FMIFS_UNKNOWN18
Definition: fmifs.h:57
@ FMIFS_UNKNOWN0
Definition: fmifs.h:39
@ FMIFS_UNKNOWN21
Definition: fmifs.h:60
@ FMIFS_UNKNOWN15
Definition: fmifs.h:54
@ FMIFS_UNKNOWN16
Definition: fmifs.h:55
@ FMIFS_UNKNOWN7
Definition: fmifs.h:46
@ FMIFS_UNKNOWN20
Definition: fmifs.h:59
@ FMIFS_UNKNOWN19
Definition: fmifs.h:58
@ FMIFS_UNKNOWN6
Definition: fmifs.h:45
@ FMIFS_REMOVABLE
Definition: fmifs.h:50
@ FMIFS_UNKNOWN5
Definition: fmifs.h:44
@ FMIFS_UNKNOWN9
Definition: fmifs.h:48
@ FMIFS_HARDDISK
Definition: fmifs.h:51
@ FMIFS_UNKNOWN2
Definition: fmifs.h:41

Function Documentation

◆ Chkdsk()

VOID NTAPI Chkdsk ( IN PWCHAR  DriveRoot,
IN PWCHAR  Format,
IN BOOLEAN  CorrectErrors,
IN BOOLEAN  Verbose,
IN BOOLEAN  CheckOnlyIfDirty,
IN BOOLEAN  ScanDrive,
IN PVOID  Unused2,
IN PVOID  Unused3,
IN PFMIFSCALLBACK  Callback 
)

Definition at line 18 of file chkdsk.c.

28{
30 UNICODE_STRING usDriveRoot;
34 //CURDIR CurDir;
35
37 if (!Provider)
38 {
39 /* Unknown file system */
40 Callback(DONE, 0, &Success);
41 return;
42 }
43
44#if 1
45 DPRINT1("Warning: use GetVolumeNameForVolumeMountPointW() instead!\n");
46 swprintf(VolumeName, L"\\??\\%c:", towupper(DriveRoot[0]));
48 /* Code disabled as long as our storage stack doesn't understand IOCTL_MOUNTDEV_QUERY_DEVICE_NAME */
49#else
51 !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir))
52 {
53 /* Report an error */
54 Callback(DONE, 0, &Success);
55 return;
56 }
57#endif
58
59 DPRINT("Chkdsk() - %S\n", Format);
61 Success = Provider->Chkdsk(&usDriveRoot,
63 CorrectErrors,
64 Verbose,
65 CheckOnlyIfDirty,
66 ScanDrive,
67 NULL,
68 NULL,
69 NULL,
70 NULL,
71 (PULONG)&Status);
72 if (!Success)
73 DPRINT1("Chkdsk() failed with Status 0x%lx\n", Status);
74
75 /* Report success */
76 Callback(DONE, 0, &Success);
77
78 RtlFreeUnicodeString(&usDriveRoot);
79}
unsigned char BOOLEAN
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
BOOL Verbose
Definition: chkdsk.c:72
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
#define swprintf
Definition: precomp.h:40
@ Success
Definition: eventcreate.c:712
_Must_inspect_result_ _Inout_opt_ PUNICODE_STRING VolumeName
Definition: fltkernel.h:1117
return pInstance GetProvider() -> GetHandle()
Status
Definition: gdiplustypes.h:25
unsigned int * PULONG
Definition: retypes.h:1
BOOL WINAPI GetVolumeNameForVolumeMountPointW(IN LPCWSTR VolumeMountPoint, OUT LPWSTR VolumeName, IN DWORD VolumeNameLength)
Definition: mntpoint.c:496
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define L(x)
Definition: ntvdm.h:50
#define DONE
Definition: rnr20lib.h:14
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:71
#define towupper(c)
Definition: wctype.h:99
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by ChkDskNow(), and wmain().

◆ ChkdskEx()

VOID NTAPI ChkdskEx ( IN PWCHAR  DriveRoot,
IN PWCHAR  Format,
IN BOOLEAN  CorrectErrors,
IN BOOLEAN  Verbose,
IN BOOLEAN  CheckOnlyIfDirty,
IN BOOLEAN  ScanDrive,
IN PVOID  Unused2,
IN PVOID  Unused3,
IN PFMIFSCALLBACK  Callback 
)

◆ ComputeFmMediaType()

FMIFS_MEDIA_FLAG NTAPI ComputeFmMediaType ( IN ULONG  MediaType)

◆ DiskCopy()

VOID NTAPI DiskCopy ( VOID  )

Definition at line 15 of file diskcopy.c.

16{
17}

◆ EnableVolumeCompression()

BOOLEAN NTAPI EnableVolumeCompression ( IN PWCHAR  DriveRoot,
IN USHORT  Compression 
)

Definition at line 17 of file compress.c.

20{
22 DWORD RetBytes;
23 BOOL Ret;
24
25 hFile = CreateFileW(DriveRoot,
28 NULL,
31 NULL);
33 return FALSE;
34
37 &Compression,
38 sizeof(USHORT),
39 NULL,
40 0,
41 &RetBytes,
42 NULL);
43
45
46 return (Ret != 0);
47}
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileW
Definition: compat.h:741
#define FILE_SHARE_READ
Definition: compat.h:136
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FILE_FLAG_BACKUP_SEMANTICS
Definition: disk.h:41
_In_ HANDLE hFile
Definition: mswsock.h:90
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FILE_WRITE_DATA
Definition: nt_native.h:631
#define FILE_READ_DATA
Definition: nt_native.h:628
#define FSCTL_SET_COMPRESSION
Definition: nt_native.h:842
unsigned short USHORT
Definition: pedump.c:61

Referenced by wmain().

◆ Format()

VOID NTAPI Format ( IN PWCHAR  DriveRoot,
IN FMIFS_MEDIA_FLAG  MediaFlag,
IN PWCHAR  Format,
IN PWCHAR  Label,
IN BOOLEAN  QuickFormat,
IN PFMIFSCALLBACK  Callback 
)

Definition at line 18 of file format.c.

25{
26 FormatEx(DriveRoot,
27 MediaFlag,
28 Format,
29 Label,
31 0,
32 Callback);
33}
BOOL QuickFormat
Definition: format.c:66
PWCHAR Label
Definition: format.c:70
VOID NTAPI FormatEx(IN PWCHAR DriveRoot, IN FMIFS_MEDIA_FLAG MediaFlag, IN PWCHAR Format, IN PWCHAR Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN PFMIFSCALLBACK Callback)
Definition: format.c:38

◆ FormatEx()

VOID NTAPI FormatEx ( IN PWCHAR  DriveRoot,
IN FMIFS_MEDIA_FLAG  MediaFlag,
IN PWCHAR  Format,
IN PWCHAR  Label,
IN BOOLEAN  QuickFormat,
IN ULONG  ClusterSize,
IN PFMIFSCALLBACK  Callback 
)

Definition at line 38 of file format.c.

46{
48 UNICODE_STRING usDriveRoot;
49 UNICODE_STRING usLabel;
51 BOOLEAN BackwardCompatible = FALSE; // Default to latest FS versions.
52 MEDIA_TYPE MediaType;
54 //CURDIR CurDir;
55
56//
57// TODO: Convert filesystem Format into ULIB format string.
58//
59
61 if (!Provider)
62 {
63 /* Unknown file system */
64 Callback(DONE, 0, &Success);
65 return;
66 }
67
68#if 1
69 DPRINT1("Warning: use GetVolumeNameForVolumeMountPointW() instead!\n");
70 swprintf(VolumeName, L"\\??\\%c:", towupper(DriveRoot[0]));
72 /* Code disabled as long as our storage stack doesn't understand IOCTL_MOUNTDEV_QUERY_DEVICE_NAME */
73#else
75 !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir))
76 {
77 /* Report an error */
78 Callback(DONE, 0, &Success);
79 return;
80 }
81#endif
82
83 RtlInitUnicodeString(&usLabel, Label);
84
85 /* Set the BackwardCompatible flag in case we format with older FAT12/16 */
86 if (wcsicmp(Format, L"FAT") == 0)
87 BackwardCompatible = TRUE;
88 // else if (wcsicmp(Format, L"FAT32") == 0)
89 // BackwardCompatible = FALSE;
90
91 /* Convert the FMIFS MediaFlag to a NT MediaType */
92 // FIXME: Actually covert all the possible flags.
93 switch (MediaFlag)
94 {
95 case FMIFS_FLOPPY:
96 MediaType = F5_320_1024; // FIXME: This is hardfixed!
97 break;
98 case FMIFS_REMOVABLE:
99 MediaType = RemovableMedia;
100 break;
101 case FMIFS_HARDDISK:
102 MediaType = FixedMedia;
103 break;
104 default:
105 DPRINT1("Unknown FMIFS MediaFlag %d, converting 1-to-1 to NT MediaType\n",
106 MediaFlag);
107 MediaType = (MEDIA_TYPE)MediaFlag;
108 break;
109 }
110
111 DPRINT("Format() - %S\n", Format);
112 Success = Provider->Format(&usDriveRoot,
113 Callback,
115 BackwardCompatible,
116 MediaType,
117 &usLabel,
119 if (!Success)
120 DPRINT1("Format() failed\n");
121
122 /* Report success */
123 Callback(DONE, 0, &Success);
124
125 RtlFreeUnicodeString(&usDriveRoot);
126}
DWORD ClusterSize
Definition: format.c:67
#define TRUE
Definition: types.h:120
#define wcsicmp
Definition: compat.h:15
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
enum _MEDIA_TYPE MEDIA_TYPE
@ RemovableMedia
Definition: ntdddisk.h:387
@ FixedMedia
Definition: ntdddisk.h:388
@ F5_320_1024
Definition: ntdddisk.h:384

Referenced by Format(), FormatDrive(), and wmain().

◆ QueryAvailableFileSystemFormat()

BOOLEAN NTAPI QueryAvailableFileSystemFormat ( IN DWORD  Index,
IN OUT PWCHAR  FileSystem,
OUT UCHAR Major,
OUT UCHAR Minor,
OUT BOOLEAN LatestVersion 
)

Definition at line 14 of file query.c.

20{
21 PLIST_ENTRY ListEntry;
23
24 if (!FileSystem || !Major ||!Minor ||!LatestVersion)
25 return FALSE;
26
27 ListEntry = ProviderListHead.Flink;
28 while (TRUE)
29 {
30 if (ListEntry == &ProviderListHead)
31 return FALSE;
32 if (Index == 0)
33 break;
34 ListEntry = ListEntry->Flink;
35 Index--;
36 }
37
38 Provider = CONTAINING_RECORD(ListEntry, IFS_PROVIDER, ListEntry);
40 *Major = 0; /* FIXME */
41 *Minor = 0; /* FIXME */
42 *LatestVersion = TRUE; /* FIXME */
43
44 return TRUE;
45}
PWCHAR FileSystem
Definition: format.c:72
LIST_ENTRY ProviderListHead
Definition: init.c:20
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
_In_ WDFCOLLECTION _In_ ULONG Index
_Out_opt_ PULONG Minor
Definition: cmfuncs.h:44

Referenced by InitializeFormatDriveDlg(), and Usage().

◆ QueryDeviceInformation()

BOOL NTAPI QueryDeviceInformation ( IN PWCHAR  DriveRoot,
OUT ULONG Buffer,
IN ULONG  BufferSize 
)

◆ QueryFileSystemName()

BOOL NTAPI QueryFileSystemName ( IN PWCHAR  DriveRoot,
OUT PWCHAR FileSystem  OPTIONAL,
OUT UCHAR *Unknown2  OPTIONAL,
OUT UCHAR *Unknown3  OPTIONAL,
OUT ULONG *Unknown4  OPTIONAL 
)

◆ QueryLatestFileSystemVersion()

BOOLEAN NTAPI QueryLatestFileSystemVersion ( IN PWCHAR  FileSystem,
OUT UCHAR *Major  OPTIONAL,
OUT UCHAR *Minor  OPTIONAL 
)

◆ QuerySupportedMedia()

BOOL NTAPI QuerySupportedMedia ( IN PWCHAR  DriveRoot,
OUT FMIFS_MEDIA_FLAG *CurrentMedia  OPTIONAL,
IN ULONG  Unknown3,
OUT PULONG  Unknown4 
)

Definition at line 15 of file media.c.

20{
21 return FALSE;
22}

◆ SetLabel()

BOOL NTAPI SetLabel ( IN PWCHAR  DriveRoot,
IN PWCHAR  Label 
)