Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenformat.c
Go to the documentation of this file.
00001 /* 00002 * COPYRIGHT: See COPYING in the top level directory 00003 * PROJECT: File Management IFS Utility functions 00004 * FILE: reactos/dll/win32/fmifs/format.c 00005 * PURPOSE: Volume format 00006 * 00007 * PROGRAMMERS: Emanuele Aliberti 00008 * Hervé Poussineau (hpoussin@reactos.org) 00009 */ 00010 00011 #include "precomp.h" 00012 00013 #define NDEBUG 00014 #include <debug.h> 00015 00016 /* FMIFS.6 */ 00017 VOID NTAPI 00018 Format(VOID) 00019 { 00020 } 00021 00022 /* FMIFS.7 */ 00023 VOID NTAPI 00024 FormatEx( 00025 IN PWCHAR DriveRoot, 00026 IN FMIFS_MEDIA_FLAG MediaFlag, 00027 IN PWCHAR Format, 00028 IN PWCHAR Label, 00029 IN BOOLEAN QuickFormat, 00030 IN ULONG ClusterSize, 00031 IN PFMIFSCALLBACK Callback) 00032 { 00033 PIFS_PROVIDER Provider; 00034 UNICODE_STRING usDriveRoot; 00035 UNICODE_STRING usLabel; 00036 BOOLEAN Argument = FALSE; 00037 WCHAR VolumeName[MAX_PATH]; 00038 //CURDIR CurDir; 00039 00040 Provider = GetProvider(Format); 00041 if (!Provider) 00042 { 00043 /* Unknown file system */ 00044 Callback( 00045 DONE, /* Command */ 00046 0, /* DWORD Modifier */ 00047 &Argument); /* Argument */ 00048 return; 00049 } 00050 00051 #if 1 00052 DPRINT1("Warning: use GetVolumeNameForVolumeMountPointW() instead!\n"); 00053 swprintf(VolumeName, L"\\??\\%c:", towupper(DriveRoot[0])); 00054 RtlCreateUnicodeString(&usDriveRoot, VolumeName); 00055 /* Code disabled as long as our storage stack doesn't understand IOCTL_MOUNTDEV_QUERY_DEVICE_NAME */ 00056 #else 00057 if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH) 00058 || !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir)) 00059 { 00060 /* Report an error. */ 00061 Callback( 00062 DONE, /* Command */ 00063 0, /* DWORD Modifier */ 00064 &Argument); /* Argument */ 00065 return; 00066 } 00067 #endif 00068 00069 RtlInitUnicodeString(&usLabel, Label); 00070 00071 DPRINT("FormatEx - %S\n", Format); 00072 Provider->FormatEx( 00073 &usDriveRoot, 00074 MediaFlag, 00075 &usLabel, 00076 QuickFormat, 00077 ClusterSize, 00078 Callback); 00079 RtlFreeUnicodeString(&usDriveRoot); 00080 } 00081 00082 /* EOF */ Generated on Sun May 27 2012 04:17:58 for ReactOS by
1.7.6.1
|