3 * COPYING: See the top level directory
5 * FILE: reactos/lib/fmifs/format.c
6 * DESCRIPTION: File management IFS utility functions
7 * PROGRAMMER: Emanuele Aliberti
9 * 1999-02-16 (Emanuele Aliberti)
27 FormatEx (PWCHAR DriveRoot
,
33 PFMIFSCALLBACK Callback
)
35 UNICODE_STRING usDriveRoot
;
36 UNICODE_STRING usLabel
;
37 BOOLEAN Argument
= FALSE
;
38 WCHAR VolumeName
[MAX_PATH
];
41 if (_wcsnicmp(Format
, L
"FAT", 3) != 0)
43 /* Unknown file system */
44 Callback (DONE
, /* Command */
45 0, /* DWORD Modifier */
46 &Argument
); /* Argument */
49 if (!GetVolumeNameForVolumeMountPointW(DriveRoot
, VolumeName
, MAX_PATH
) ||
50 !RtlDosPathNameToNtPathName_U(VolumeName
, &usDriveRoot
, NULL
, &CurDir
))
52 /* Report an error. */
53 Callback (DONE
, /* Command */
54 0, /* DWORD Modifier */
55 &Argument
); /* Argument */
60 RtlInitUnicodeString(&usLabel
, Label
);
62 if (_wcsnicmp(Format
, L
"FAT", 3) == 0)
64 DPRINT1("FormatEx - FAT\n");
67 VfatFormat (&usDriveRoot
,
74 RtlFreeUnicodeString(&usDriveRoot
);