ReactOS 0.4.16-dev-2104-gb84fa49
vfatlib.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS VFAT filesystem library
4 * FILE: lib\fslib\vfatlib\vfatlib.c
5 * PURPOSE: Main API
6 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7 * Aleksey Bragin (aleksey@reactos.org)
8 * Hermes Belusca-Maito (hermes.belusca@sfr.fr)
9 */
10/* fsck.fat.c - User interface
11
12 Copyright (C) 1993 Werner Almesberger <werner.almesberger@lrc.di.epfl.ch>
13 Copyright (C) 1998 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
14 Copyright (C) 2008-2014 Daniel Baumann <mail@daniel-baumann.ch>
15
16 This program is free software: you can redistribute it and/or modify
17 it under the terms of the GNU General Public License as published by
18 the Free Software Foundation, either version 3 of the License, or
19 (at your option) any later version.
20
21 This program is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU General Public License for more details.
25
26 You should have received a copy of the GNU General Public License
27 along with this program. If not, see <http://www.gnu.org/licenses/>.
28
29 The complete text of the GNU General Public License
30 can be found in /usr/share/common-licenses/GPL-3 file.
31*/
32
33/* INCLUDES *******************************************************************/
34
35#include "vfatlib.h"
36
37#define NDEBUG
38#include <debug.h>
39
40
41/* GLOBALS & FUNCTIONS ********************************************************/
42
47
51 IN PUNICODE_STRING DriveRoot,
54 IN BOOLEAN BackwardCompatible,
55 IN MEDIA_TYPE MediaType,
58{
60 DISK_GEOMETRY DiskGeometry;
65 FAT_TYPE FatType = FAT_UNKNOWN;
66 NTSTATUS Status, LockStatus;
67
68 DPRINT("VfatFormat(DriveRoot '%wZ')\n", DriveRoot);
69
70 // FIXME:
71 UNREFERENCED_PARAMETER(BackwardCompatible);
72 UNREFERENCED_PARAMETER(MediaType);
73
74 Context.TotalSectorCount = 0;
75 Context.CurrentSectorCount = 0;
76 Context.Callback = Callback;
77 Context.Success = FALSE;
78 Context.Percent = 0;
79
81 DriveRoot,
82 0,
83 NULL,
84 NULL);
85
89 &Iosb,
92 if (!NT_SUCCESS(Status))
93 {
94 DPRINT1("NtOpenFile() failed with status 0x%08x\n", Status);
95 return FALSE;
96 }
97
99 NULL,
100 NULL,
101 NULL,
102 &Iosb,
104 NULL,
105 0,
106 &DiskGeometry,
107 sizeof(DISK_GEOMETRY));
108 if (!NT_SUCCESS(Status))
109 {
110 DPRINT("IOCTL_DISK_GET_DRIVE_GEOMETRY failed with status 0x%08x\n", Status);
112 return FALSE;
113 }
114
115 if (DiskGeometry.MediaType == FixedMedia)
116 {
117 DPRINT("Cylinders %I64d\n", DiskGeometry.Cylinders.QuadPart);
118 DPRINT("TracksPerCylinder %ld\n", DiskGeometry.TracksPerCylinder);
119 DPRINT("SectorsPerTrack %ld\n", DiskGeometry.SectorsPerTrack);
120 DPRINT("BytesPerSector %ld\n", DiskGeometry.BytesPerSector);
121 DPRINT("DiskSize %I64d\n",
122 DiskGeometry.Cylinders.QuadPart *
123 (ULONGLONG)DiskGeometry.TracksPerCylinder *
124 (ULONGLONG)DiskGeometry.SectorsPerTrack *
125 (ULONGLONG)DiskGeometry.BytesPerSector);
126
128 NULL,
129 NULL,
130 NULL,
131 &Iosb,
133 NULL,
134 0,
137 if (!NT_SUCCESS(Status))
138 {
139 DPRINT("IOCTL_DISK_GET_PARTITION_INFO_EX failed with status 0x%08x\n", Status);
141 return FALSE;
142 }
143 }
144 else
145 {
146 PartitionInfo.PartitionStyle = PARTITION_STYLE_MBR;
147 PartitionInfo.Mbr.PartitionType = 0;
148 PartitionInfo.StartingOffset.QuadPart = 0ULL;
149 PartitionInfo.PartitionLength.QuadPart =
150 DiskGeometry.Cylinders.QuadPart *
151 (ULONGLONG)DiskGeometry.TracksPerCylinder *
152 (ULONGLONG)DiskGeometry.SectorsPerTrack *
153 (ULONGLONG)DiskGeometry.BytesPerSector;
154 PartitionInfo.Mbr.HiddenSectors = 0;
155 PartitionInfo.PartitionNumber = 0;
156 PartitionInfo.Mbr.BootIndicator = FALSE;
157 PartitionInfo.RewritePartition = FALSE;
158 PartitionInfo.Mbr.RecognizedPartition = FALSE;
159 }
160
161 /* If it already has a FAT FS, we'll use that type.
162 * If it doesn't, we will determine the FAT type based on size and offset */
163
164 if (PartitionInfo.PartitionStyle == PARTITION_STYLE_MBR)
165 {
166 if (PartitionInfo.Mbr.PartitionType == PARTITION_FAT_12)
167 {
168 FatType = FAT_12;
169 }
170 else if (PartitionInfo.Mbr.PartitionType == PARTITION_FAT_16 ||
171 PartitionInfo.Mbr.PartitionType == PARTITION_HUGE ||
172 PartitionInfo.Mbr.PartitionType == PARTITION_XINT13)
173 {
174 FatType = FAT_16;
175 }
176 else if (PartitionInfo.Mbr.PartitionType == PARTITION_FAT32 ||
177 PartitionInfo.Mbr.PartitionType == PARTITION_FAT32_XINT13)
178 {
179 FatType = FAT_32;
180 }
181
182 if (FatType == FAT_UNKNOWN)
183 {
184 /* Determine the correct type based upon size and offset (copied from usetup) */
185 if (PartitionInfo.PartitionLength.QuadPart < (4200LL * 1024LL))
186 {
187 /* FAT12 CHS partition (disk is smaller than 4.1MB) */
188 FatType = FAT_12;
189 }
190 else if (PartitionInfo.StartingOffset.QuadPart < (1024LL * 255LL * 63LL * 512LL))
191 {
192 /* Partition starts below the 8.4GB boundary ==> CHS partition */
193
194 if (PartitionInfo.PartitionLength.QuadPart < (32LL * 1024LL * 1024LL))
195 {
196 /* FAT16 CHS partition (partition size < 32MB) */
197 FatType = FAT_16;
198 }
199 else if (PartitionInfo.PartitionLength.QuadPart < (512LL * 1024LL * 1024LL))
200 {
201 /* FAT16 CHS partition (partition size < 512MB) */
202 FatType = FAT_16;
203 }
204 else
205 {
206 /* FAT32 CHS partition (partition size >= 512MB) */
207 FatType = FAT_32;
208 }
209 }
210 else
211 {
212 /* Partition starts above the 8.4GB boundary ==> LBA partition */
213
214 if (PartitionInfo.PartitionLength.QuadPart < (512LL * 1024LL * 1024LL))
215 {
216 /* FAT16 LBA partition (partition size < 512MB) */
217 FatType = FAT_16;
218 }
219 else
220 {
221 /* FAT32 LBA partition (partition size >= 512MB) */
222 FatType = FAT_32;
223 }
224 }
225 }
226
227 DPRINT("PartitionType 0x%x\n", PartitionInfo.Mbr.PartitionType);
228 DPRINT("StartingOffset %I64d\n", PartitionInfo.StartingOffset.QuadPart);
229 DPRINT("PartitionLength %I64d\n", PartitionInfo.PartitionLength.QuadPart);
230 DPRINT("HiddenSectors %lu\n", PartitionInfo.Mbr.HiddenSectors);
231 DPRINT("PartitionNumber %d\n", PartitionInfo.PartitionNumber);
232 DPRINT("BootIndicator 0x%x\n", PartitionInfo.Mbr.BootIndicator);
233 DPRINT("RewritePartition %d\n", PartitionInfo.RewritePartition);
234 DPRINT("RecognizedPartition %d\n", PartitionInfo.Mbr.RecognizedPartition);
235 }
236 else if (PartitionInfo.PartitionStyle == PARTITION_STYLE_GPT)
237 {
238 if (PartitionInfo.PartitionLength.QuadPart < (4200LL * 1024LL))
239 {
240 /* FAT12 CHS partition (disk is smaller than 4.1MB) */
241 FatType = FAT_12;
242 }
243 else if (PartitionInfo.PartitionLength.QuadPart < (512LL * 1024LL * 1024LL))
244 {
245 /* FAT16 partition (partition size < 512MB) */
246 FatType = FAT_16;
247 }
248 else if (PartitionInfo.PartitionLength.QuadPart <= (32LL * 1024LL * 1024LL * 1024LL))
249 {
250 /* FAT32 partition (partition size < 32GB) */
251 FatType = FAT_32;
252 }
253 else
254 {
255 DPRINT1("The partition ist too large (> 32 GB) for the FAT file system!\n");
257 return FALSE;
258 }
259
260 DPRINT("StartingOffset %I64d\n", PartitionInfo.StartingOffset.QuadPart);
261 DPRINT("PartitionLength %I64d\n", PartitionInfo.PartitionLength.QuadPart);
262 DPRINT("PartitionNumber %d\n", PartitionInfo.PartitionNumber);
263 DPRINT("RewritePartition %d\n", PartitionInfo.RewritePartition);
264 }
265
266 if (Callback != NULL)
267 {
268 Context.Percent = 0;
269 Callback(PROGRESS, 0, (PVOID)&Context.Percent);
270 }
271
272 LockStatus = NtFsControlFile(FileHandle,
273 NULL,
274 NULL,
275 NULL,
276 &Iosb,
278 NULL,
279 0,
280 NULL,
281 0);
282 if (!NT_SUCCESS(LockStatus))
283 {
284 DPRINT1("WARNING: Failed to lock volume for formatting! Format may fail! (Status: 0x%x)\n", LockStatus);
285 }
286
287 if (FatType == FAT_12)
288 {
289 /* FAT12 */
292 &DiskGeometry,
293 Label,
296 &Context);
297 }
298 else if (FatType == FAT_16)
299 {
300 /* FAT16 */
303 &DiskGeometry,
304 Label,
307 &Context);
308 }
309 else if (FatType == FAT_32)
310 {
311 /* FAT32 */
314 &DiskGeometry,
315 Label,
318 &Context);
319 }
320 else
321 {
323 }
324
325 /* Attempt to dismount formatted volume */
326 LockStatus = NtFsControlFile(FileHandle,
327 NULL,
328 NULL,
329 NULL,
330 &Iosb,
332 NULL,
333 0,
334 NULL,
335 0);
336 if (!NT_SUCCESS(LockStatus))
337 {
338 DPRINT1("Failed to umount volume (Status: 0x%x)\n", LockStatus);
339 }
340
341 LockStatus = NtFsControlFile(FileHandle,
342 NULL,
343 NULL,
344 NULL,
345 &Iosb,
347 NULL,
348 0,
349 NULL,
350 0);
351 if (!NT_SUCCESS(LockStatus))
352 {
353 DPRINT1("Failed to unlock volume (Status: 0x%x)\n", LockStatus);
354 }
355
357
358 DPRINT("VfatFormat() done. Status 0x%08x\n", Status);
359 return NT_SUCCESS(Status);
360}
361
362
363VOID
366{
367 ULONG NewPercent;
368
369 Context->CurrentSectorCount += (ULONGLONG)Increment;
370
371 NewPercent = (Context->CurrentSectorCount * 100ULL) / Context->TotalSectorCount;
372
373 if (NewPercent > Context->Percent)
374 {
375 Context->Percent = NewPercent;
376 if (Context->Callback != NULL)
377 {
378 Context->Callback(PROGRESS, 0, &Context->Percent);
379 }
380 }
381}
382
383
384VOID
386{
388 CHAR TextBuf[512];
389
390 _vsnprintf(TextBuf, sizeof(TextBuf), Format, args);
391
392 /* Prepare parameters */
393 TextOut.Lines = 1;
394 TextOut.Output = TextBuf;
395
396 DPRINT1("VfatPrint -- %s", TextBuf);
397
398 /* Do the callback */
399 if (ChkdskCallback)
401}
402
403
404VOID
406{
408
411 va_end(args);
412}
413
414
416NTAPI
418 IN PUNICODE_STRING DriveRoot,
422 IN BOOLEAN CheckOnlyIfDirty,
423 IN BOOLEAN ScanDrive,
424 IN PVOID pUnknown1,
425 IN PVOID pUnknown2,
426 IN PVOID pUnknown3,
427 IN PVOID pUnknown4,
429{
430 BOOLEAN verify;
431 BOOLEAN salvage_files;
432 ULONG free_clusters;
433 DOS_FS fs;
435
436 UNREFERENCED_PARAMETER(pUnknown1);
437 UNREFERENCED_PARAMETER(pUnknown2);
438 UNREFERENCED_PARAMETER(pUnknown3);
439 UNREFERENCED_PARAMETER(pUnknown4);
440
441 RtlZeroMemory(&fs, sizeof(fs));
442
443 /* Store callback pointer */
446
447 /* Set parameters */
448 FsCheckFlags = 0;
449 if (Verbose)
451 if (FixErrors)
453
455
456 verify = TRUE;
457 salvage_files = TRUE;
458
459 /* Open filesystem and lock it */
462 {
463 /* We failed to lock, ask the caller whether we should continue */
464 if (Callback(VOLUMEINUSE, 0, NULL))
465 {
467 }
468 }
469 if (!NT_SUCCESS(Status))
470 {
473 return FALSE;
474 }
475
476 if (CheckOnlyIfDirty && !fs_isdirty())
477 {
478 /* Unlock volume if required */
480 fs_lock(FALSE);
481
482 /* No need to check FS */
485 return (Status == STATUS_SUCCESS);
486 }
487 else if (CheckOnlyIfDirty && fs_isdirty())
488 {
490 {
493 return FALSE;
494 }
495 }
496
497 read_boot(&fs);
498
499 if (verify)
500 VfatPrint("Starting check/repair pass.\n");
501
502 while (read_fat(&fs), scan_root(&fs))
504
505 if (ScanDrive)
506 fix_bad(&fs);
507
508 if (salvage_files)
510 else
512
513 free_clusters = update_free(&fs);
514 file_unused();
516 if (verify)
517 {
519 VfatPrint("Starting verification pass.\n");
520 read_fat(&fs);
521 scan_root(&fs);
524 }
525
526 if (fs_changed())
527 {
529 {
531 {
532 FixErrors = get_key("yn", "Perform changes ? (y/n)") == 'y';
533 if (FixErrors)
535 else
536 FsCheckFlags &= ~FSCHECK_READ_WRITE;
537 }
538 else
539 VfatPrint("Performing changes.\n");
540 }
541 else
542 {
543 VfatPrint("Leaving filesystem unchanged.\n");
544 }
545 }
546
547 VfatPrint("%wZ: %u files, %lu/%lu clusters\n", DriveRoot,
548 FsCheckTotalFiles, fs.data_clusters - free_clusters, fs.data_clusters);
549
551 {
552 /* Dismount the volume */
553 fs_dismount();
554
555 /* Unlock the volume */
556 fs_lock(FALSE);
557 }
558
559 // https://technet.microsoft.com/en-us/library/cc730714.aspx
560 // https://support.microsoft.com/en-us/kb/265533
561
562 /* Close the volume */
565 return (Status == STATUS_SUCCESS);
566}
567
568/* EOF */
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
BOOL FixErrors
Definition: chkdsk.c:69
BOOL Verbose
Definition: chkdsk.c:72
BOOL QuickFormat
Definition: format.c:66
PWCHAR Label
Definition: format.c:70
DWORD ClusterSize
Definition: format.c:67
#define PARTITION_XINT13
Definition: disk.h:82
#define PARTITION_FAT32
Definition: disk.h:80
#define PARTITION_FAT_12
Definition: disk.h:72
#define PARTITION_HUGE
Definition: disk.h:77
#define PARTITION_FAT_16
Definition: disk.h:75
#define PARTITION_FAT32_XINT13
Definition: disk.h:81
#define IOCTL_DISK_GET_DRIVE_GEOMETRY
Definition: cdrw_usr.h:169
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define FILE_SHARE_READ
Definition: compat.h:136
#define OUTPUT(ch)
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
char * va_list
Definition: vadefs.h:50
return Iosb
Definition: create.c:4403
err_t fs_open(struct fs_file *file, const char *name)
Definition: fs.c:43
void fs_close(struct fs_file *file)
Definition: fs.c:83
NTSTATUS Fat12Format(IN HANDLE FileHandle, IN PPARTITION_INFORMATION_EX PartitionInfo, IN PDISK_GEOMETRY DiskGeometry, IN PUNICODE_STRING Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN OUT PFORMAT_CONTEXT Context)
Definition: fat12.c:239
NTSTATUS Fat16Format(IN HANDLE FileHandle, IN PPARTITION_INFORMATION_EX PartitionInfo, IN PDISK_GEOMETRY DiskGeometry, IN PUNICODE_STRING Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN OUT PFORMAT_CONTEXT Context)
Definition: fat16.c:238
NTSTATUS Fat32Format(IN HANDLE FileHandle, IN PPARTITION_INFORMATION_EX PartitionInfo, IN PDISK_GEOMETRY DiskGeometry, IN PUNICODE_STRING Label, IN BOOLEAN QuickFormat, IN ULONG ClusterSize, IN OUT PFORMAT_CONTEXT Context)
Definition: fat32.c:386
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
Definition: CrNtStubs.h:46
#define IOCTL_DISK_GET_PARTITION_INFO_EX
Definition: ntddk_ex.h:206
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
@ VOLUMEINUSE
Definition: fmifs.h:91
@ PROGRESS
Definition: fmifs.h:83
BOOLEAN(NTAPI * PFMIFSCALLBACK)(IN CALLBACKCOMMAND Command, IN ULONG SubAction, IN PVOID ActionInfo)
Definition: fmifs.h:104
#define FILE_SYNCHRONOUS_IO_ALERT
Definition: from_kernel.h:30
int scan_root(DOS_FS *fs)
Definition: check.c:1232
Status
Definition: gdiplustypes.h:25
#define fs
Definition: i386-dis.c:444
FAT_TYPE
Definition: vfatlib.h:113
@ FAT_32
Definition: vfatlib.h:117
@ FAT_12
Definition: vfatlib.h:115
@ FAT_16
Definition: vfatlib.h:116
@ FAT_UNKNOWN
Definition: vfatlib.h:114
if(dx< 0)
Definition: linetemp.h:194
@ PARTITION_STYLE_GPT
Definition: imports.h:202
@ PARTITION_STYLE_MBR
Definition: imports.h:201
#define ULL(a, b)
Definition: format_msg.c:27
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
_In_ NTSTATUS ExitStatus
Definition: psfuncs.h:868
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
Definition: file.c:3953
#define SYNCHRONIZE
Definition: nt_native.h:61
#define FSCTL_LOCK_VOLUME
Definition: nt_native.h:832
NTSYSAPI NTSTATUS NTAPI NtDeviceIoControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define FSCTL_UNLOCK_VOLUME
Definition: nt_native.h:833
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
#define FSCTL_DISMOUNT_VOLUME
Definition: nt_native.h:834
NTSYSAPI NTSTATUS NTAPI NtFsControlFile(IN HANDLE hFile, IN HANDLE hEvent OPTIONAL, IN PIO_APC_ROUTINE IoApcRoutine OPTIONAL, IN PVOID IoApcContext OPTIONAL, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG DeviceIoControlCode, IN PVOID InBuffer OPTIONAL, IN ULONG InBufferLength, OUT PVOID OutBuffer OPTIONAL, IN ULONG OutBufferLength)
#define FILE_GENERIC_READ
Definition: nt_native.h:653
#define FILE_GENERIC_WRITE
Definition: nt_native.h:660
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
enum _MEDIA_TYPE MEDIA_TYPE
@ FixedMedia
Definition: ntdddisk.h:383
#define FSCHECK_VERBOSE
Definition: rosglue.h:25
#define FSCHECK_READ_WRITE
Definition: rosglue.h:27
#define FSCHECK_INTERACTIVE
Definition: rosglue.h:23
void read_boot(DOS_FS *fs)
Definition: boot.c:334
void qfree(void **root)
Definition: common.c:157
char get_key(const char *valid, const char *prompt)
Definition: common.c:184
void fix_bad(DOS_FS *fs)
Definition: fat.c:322
void reclaim_free(DOS_FS *fs)
Definition: fat.c:340
uint32_t update_free(DOS_FS *fs)
Definition: fat.c:531
void read_fat(DOS_FS *fs)
Definition: fat.c:81
void reclaim_file(DOS_FS *fs)
Definition: fat.c:426
void file_unused(void)
Definition: file.c:269
int fs_changed(void)
Definition: io.c:475
#define args
Definition: format.c:66
#define STATUS_SUCCESS
Definition: shellext.h:65
#define DPRINT
Definition: sndvol32.h:73
MEDIA_TYPE MediaType
Definition: ntdddisk.h:401
LARGE_INTEGER Cylinders
Definition: ntdddisk.h:400
ULONG TracksPerCylinder
Definition: ntdddisk.h:402
ULONG SectorsPerTrack
Definition: ntdddisk.h:403
ULONG BytesPerSector
Definition: ntdddisk.h:404
Definition: match.c:390
Definition: ffs.h:70
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
char * PCHAR
Definition: typedefs.h:51
#define STATUS_ACCESS_DENIED
Definition: udferr_usr.h:145
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
#define STATUS_DISK_CORRUPT_ERROR
Definition: udferr_usr.h:147
LONGLONG QuadPart
Definition: typedefs.h:114
ULONG FsCheckFlags
Definition: vfatlib.c:44
PFMIFSCALLBACK ChkdskCallback
Definition: vfatlib.c:43
BOOLEAN NTAPI VfatChkdsk(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: vfatlib.c:417
VOID VfatPrint(PCHAR Format,...)
Definition: vfatlib.c:405
PVOID FsCheckMemQueue
Definition: vfatlib.c:45
ULONG FsCheckTotalFiles
Definition: vfatlib.c:46
VOID UpdateProgress(PFORMAT_CONTEXT Context, ULONG Increment)
Definition: vfatlib.c:364
BOOLEAN NTAPI VfatFormat(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: vfatlib.c:50
VOID VfatPrintV(PCHAR Format, va_list args)
Definition: vfatlib.c:385
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
#define TextOut
Definition: wingdi.h:4929
_In_ ULONG _In_ struct _SET_PARTITION_INFORMATION_EX * PartitionInfo
Definition: iofuncs.h:2105
#define _vsnprintf
Definition: xmlstorage.h:202
char CHAR
Definition: xmlstorage.h:175