update for HEAD-2003050101
[reactos.git] / lib / fmifs / format.c
1 /* $Id$
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 */