update for HEAD-2003091401
[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 #include <string.h>
18
19 #define NDEBUG
20 #include <debug.h>
21
22
23 /* FMIFS.6 */
24 VOID
25 __stdcall
26 Format(VOID)
27 {
28 }
29
30
31 /* FMIFS.7 */
32 VOID
33 __stdcall
34 FormatEx(
35         PWCHAR          DriveRoot,
36         DWORD           MediaFlag,
37         PWCHAR          Format,
38         PWCHAR          Label,
39         BOOL            QuickFormat,
40         DWORD           ClusterSize,
41         PFMIFSCALLBACK  Callback
42         )
43 {
44         UNICODE_STRING usDriveRoot;
45         UNICODE_STRING usLabel;
46         BOOL Argument = FALSE;
47
48         RtlInitUnicodeString(&usDriveRoot, DriveRoot);
49         RtlInitUnicodeString(&usLabel, Label);
50
51         if (_wcsnicmp(Format, L"FAT", 3) == 0)
52         {
53                 DPRINT1("FormatEx - FAT\n");
54                 VfatInitialize();
55
56                 VfatFormat(&usDriveRoot, MediaFlag, &usLabel, QuickFormat, ClusterSize, Callback);
57
58                 VfatCleanup();
59         }
60         else
61         {
62                 /* Unknown file system */
63                 Callback(DONE,          /* Command */
64                         0,                              /* DWORD Modifier */
65                         &Argument               /* Argument */
66                 );
67         }
68 }
69
70
71 /* EOF */