- NDK fix: don't undef a million status codes, instead, have apps define WIN32_NO_STATUS.
[reactos.git] / reactos / 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 #include "precomp.h"
13
14 #define NDEBUG
15 #include <debug.h>
16
17
18 /* FMIFS.6 */
19 VOID STDCALL
20 Format (VOID)
21 {
22 }
23
24
25 /* FMIFS.7 */
26 VOID STDCALL
27 FormatEx (PWCHAR DriveRoot,
28 ULONG MediaFlag,
29 PWCHAR Format,
30 PWCHAR Label,
31 BOOLEAN QuickFormat,
32 ULONG ClusterSize,
33 PFMIFSCALLBACK Callback)
34 {
35 UNICODE_STRING usDriveRoot;
36 UNICODE_STRING usLabel;
37 BOOLEAN Argument = FALSE;
38
39 RtlInitUnicodeString(&usDriveRoot, DriveRoot);
40 RtlInitUnicodeString(&usLabel, Label);
41
42 if (_wcsnicmp(Format, L"FAT", 3) == 0)
43 {
44 DPRINT1("FormatEx - FAT\n");
45
46 VfatInitialize ();
47 VfatFormat (&usDriveRoot,
48 MediaFlag,
49 &usLabel,
50 QuickFormat,
51 ClusterSize,
52 Callback);
53 VfatCleanup ();
54 }
55 else
56 {
57 /* Unknown file system */
58 Callback (DONE, /* Command */
59 0, /* DWORD Modifier */
60 &Argument); /* Argument */
61 }
62 }
63
64 /* EOF */