f3657d0eb52ce05386d5eef4ec8c50b0d3be07d1
[reactos.git] / subsys / system / usetup / format.c
1 /*
2  *  ReactOS kernel
3  *  Copyright (C) 2003 ReactOS Team
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 /* $Id$
20  * COPYRIGHT:       See COPYING in the top level directory
21  * PROJECT:         ReactOS text-mode setup
22  * FILE:            subsys/system/usetup/format.c
23  * PURPOSE:         Filesystem format support functions
24  * PROGRAMMER:      Casper S. Hornstrup (chorns@users.sourceforge.net)
25  */
26
27 /* INCLUDES *****************************************************************/
28
29 #include <ddk/ntddk.h>
30 #include <ntdll/rtl.h>
31 #define NDEBUG
32 #include <debug.h>
33 #include <fslib/vfatlib.h>
34
35 /* FUNCTIONS ****************************************************************/
36
37 NTSTATUS
38 FormatPartition(PUNICODE_STRING DriveRoot)
39 {
40   NTSTATUS Status;
41
42   VfatInitialize();
43
44   Status = VfatFormat (DriveRoot,
45                        0,    // MediaFlag
46                        NULL, // Label
47                        TRUE, // QuickFormat
48                        0,    // ClusterSize
49                        NULL); // Callback
50   DPRINT1("VfatFormat() status 0x%.08x\n", Status);
51
52   VfatCleanup();
53
54   return Status;
55 }
56
57 /* EOF */