fbbd851d0865da8c68573802e4ca1e363892eec8
[reactos.git] / reactos / lib / fmifs / format.c
1 /* $Id: format.c,v 1.2 2003/04/05 23:17:21 chorns Exp $
2 *
3 * COPYING: See the top level directory
4 * PROJECT: ReactOS
5 * FILE: reactos/lib/fmifs/format.c
6 * DESCRIPTION: File management IFS utility functions
7 * PROGRAMMER: Emanuele Aliberti
8 * UPDATED
9 * 1999-02-16 (Emanuele Aliberti)
10 * Entry points added.
11 */
12 #define UNICODE
13 #define _UNICODE
14 #include <windows.h>
15 #include <fmifs.h>
16 #include <fslib/vfatlib.h>
17
18 #define NDEBUG
19 #include <debug.h>
20
21
22 /* FMIFS.6 */
23 VOID
24 __stdcall
25 Format(VOID)
26 {
27 }
28
29
30 /* FMIFS.7 */
31 VOID
32 __stdcall
33 FormatEx(
34 PWCHAR DriveRoot,
35 DWORD MediaFlag,
36 PWCHAR Format,
37 PWCHAR Label,
38 BOOL QuickFormat,
39 DWORD ClusterSize,
40 PFMIFSCALLBACK Callback
41 )
42 {
43 UNICODE_STRING usDriveRoot;
44 UNICODE_STRING usLabel;
45 BOOL Argument = FALSE;
46
47 RtlInitUnicodeString(&usDriveRoot, DriveRoot);
48 RtlInitUnicodeString(&usLabel, Label);
49
50 if (_wcsnicmp(Format, L"FAT", 3) == 0)
51 {
52 DPRINT1("FormatEx - FAT\n");
53 VfatInitialize();
54
55 VfatFormat(&usDriveRoot, MediaFlag, &usLabel, QuickFormat, ClusterSize, Callback);
56
57 VfatCleanup();
58 }
59 else
60 {
61 /* Unknown file system */
62 Callback(DONE, /* Command */
63 0, /* DWORD Modifier */
64 &Argument /* Argument */
65 );
66 }
67 }
68
69
70 /* EOF */