diff --git a/reactos/dll/win32/fmifs/chkdsk.c b/reactos/dll/win32/fmifs/chkdsk.c index a1da3b11941..1d210fa7b55 100644 --- a/reactos/dll/win32/fmifs/chkdsk.c +++ b/reactos/dll/win32/fmifs/chkdsk.c @@ -1,34 +1,34 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/chkdsk.c + * PURPOSE: Chkdsk * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/chkdsk.c - * DESCRIPTION: File management IFS utility functions - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: (none) */ + #include "precomp.h" /* FMIFS.1 */ -VOID STDCALL -Chkdsk (PWCHAR DriveRoot, - PWCHAR Format, - BOOLEAN CorrectErrors, - BOOLEAN Verbose, - BOOLEAN CheckOnlyIfDirty, - BOOLEAN ScanDrive, - PVOID Unused2, - PVOID Unused3, - PFMIFSCALLBACK Callback) +VOID NTAPI +Chkdsk( + IN PWCHAR DriveRoot, + IN PWCHAR Format, + IN BOOLEAN CorrectErrors, + IN BOOLEAN Verbose, + IN BOOLEAN CheckOnlyIfDirty, + IN BOOLEAN ScanDrive, + IN PVOID Unused2, + IN PVOID Unused3, + IN PFMIFSCALLBACK Callback) { - BOOLEAN Argument = FALSE; + BOOLEAN Argument = FALSE; - /* FAIL immediately */ - Callback (DONE, /* Command */ - 0, /* DWORD Modifier */ - &Argument); /* Argument */ + /* FAIL immediately */ + Callback( + DONE, /* Command */ + 0, /* DWORD Modifier */ + &Argument);/* Argument */ } /* EOF */ diff --git a/reactos/dll/win32/fmifs/compress.c b/reactos/dll/win32/fmifs/compress.c index 1560421e6f2..8b13b423f0d 100644 --- a/reactos/dll/win32/fmifs/compress.c +++ b/reactos/dll/win32/fmifs/compress.c @@ -1,49 +1,51 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/compress.c + * PURPOSE: Volume compression * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/compress.c - * DESCRIPTION: File management IFS utility functions - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: Emanuele Aliberti */ + #include "precomp.h" /* * @implemented */ -BOOLEAN STDCALL -EnableVolumeCompression (PWCHAR DriveRoot, - USHORT Compression) +BOOLEAN NTAPI +EnableVolumeCompression( + IN PWCHAR DriveRoot, + IN USHORT Compression) { - HANDLE hFile = CreateFileW(DriveRoot, - FILE_READ_DATA | FILE_WRITE_DATA, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - FILE_FLAG_BACKUP_SEMANTICS, - NULL); - - if(hFile != INVALID_HANDLE_VALUE) - { - DWORD RetBytes; - BOOL Ret = DeviceIoControl(hFile, - FSCTL_SET_COMPRESSION, - &Compression, - sizeof(USHORT), - NULL, - 0, - &RetBytes, - NULL); + HANDLE hFile; + DWORD RetBytes; + BOOL Ret; - CloseHandle(hFile); + hFile = CreateFileW( + DriveRoot, + FILE_READ_DATA | FILE_WRITE_DATA, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS, + NULL); - return (Ret != 0); - } - - return FALSE; + if (hFile == INVALID_HANDLE_VALUE) + return FALSE; + + Ret = DeviceIoControl( + hFile, + FSCTL_SET_COMPRESSION, + &Compression, + sizeof(USHORT), + NULL, + 0, + &RetBytes, + NULL); + + CloseHandle(hFile); + + return (Ret != 0); } /* EOF */ diff --git a/reactos/dll/win32/fmifs/diskcopy.c b/reactos/dll/win32/fmifs/diskcopy.c index a821f45afe1..6a87b6f510c 100644 --- a/reactos/dll/win32/fmifs/diskcopy.c +++ b/reactos/dll/win32/fmifs/diskcopy.c @@ -1,21 +1,18 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/diskcopy.c + * PURPOSE: Disk copy * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/diskcopy.c - * DESCRIPTION: File management IFS utility functions - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: (none) */ + #include "precomp.h" /* FMIFS.3 */ -VOID STDCALL -DiskCopy (VOID) +VOID NTAPI +DiskCopy(void) { } - /* EOF */ diff --git a/reactos/dll/win32/fmifs/extend.c b/reactos/dll/win32/fmifs/extend.c index dcbbdea5235..62a69cb120b 100644 --- a/reactos/dll/win32/fmifs/extend.c +++ b/reactos/dll/win32/fmifs/extend.c @@ -1,21 +1,18 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/extend.c + * PURPOSE: Volume extension * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/extend.c - * DESCRIPTION: File management IFS utility functions - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: (none) */ + #include "precomp.h" /* FMIFS.5 */ -VOID STDCALL +VOID NTAPI Extend (VOID) { } - /* EOF */ diff --git a/reactos/dll/win32/fmifs/format.c b/reactos/dll/win32/fmifs/format.c index a69346666da..4df75f14bdf 100644 --- a/reactos/dll/win32/fmifs/format.c +++ b/reactos/dll/win32/fmifs/format.c @@ -1,78 +1,74 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/format.c + * PURPOSE: Volume format * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/format.c - * DESCRIPTION: File management IFS utility functions - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: Emanuele Aliberti */ + #include "precomp.h" #define NDEBUG #include - /* FMIFS.6 */ -VOID STDCALL -Format (VOID) +VOID NTAPI +Format(void) { } - /* FMIFS.7 */ -VOID STDCALL -FormatEx (PWCHAR DriveRoot, - ULONG MediaFlag, - PWCHAR Format, - PWCHAR Label, - BOOLEAN QuickFormat, - ULONG ClusterSize, - PFMIFSCALLBACK Callback) +VOID NTAPI +FormatEx( + IN PWCHAR DriveRoot, + IN FMIFS_MEDIA_FLAG MediaFlag, + IN PWCHAR Format, + IN PWCHAR Label, + IN BOOLEAN QuickFormat, + IN ULONG ClusterSize, + IN PFMIFSCALLBACK Callback) { - UNICODE_STRING usDriveRoot; - UNICODE_STRING usLabel; - BOOLEAN Argument = FALSE; - WCHAR VolumeName[MAX_PATH]; - CURDIR CurDir; + UNICODE_STRING usDriveRoot; + UNICODE_STRING usLabel; + BOOLEAN Argument = FALSE; + WCHAR VolumeName[MAX_PATH]; + CURDIR CurDir; - if (_wcsnicmp(Format, L"FAT", 3) != 0) - { - /* Unknown file system */ - Callback (DONE, /* Command */ - 0, /* DWORD Modifier */ - &Argument); /* Argument */ - } + if (_wcsnicmp(Format, L"FAT", 3) != 0) + { + /* Unknown file system */ + Callback( + DONE, /* Command */ + 0, /* DWORD Modifier */ + &Argument); /* Argument */ + return; + } - if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH) || - !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir)) - { - /* Report an error. */ - Callback (DONE, /* Command */ - 0, /* DWORD Modifier */ - &Argument); /* Argument */ + if (!GetVolumeNameForVolumeMountPointW(DriveRoot, VolumeName, MAX_PATH) + || !RtlDosPathNameToNtPathName_U(VolumeName, &usDriveRoot, NULL, &CurDir)) + { + /* Report an error. */ + Callback( + DONE, /* Command */ + 0, /* DWORD Modifier */ + &Argument); /* Argument */ + return; + } - return; - } + RtlInitUnicodeString(&usLabel, Label); - RtlInitUnicodeString(&usLabel, Label); - - if (_wcsnicmp(Format, L"FAT", 3) == 0) - { - DPRINT1("FormatEx - FAT\n"); - - VfatInitialize (); - VfatFormat (&usDriveRoot, - MediaFlag, - &usLabel, - QuickFormat, - ClusterSize, - Callback); - VfatCleanup (); - RtlFreeUnicodeString(&usDriveRoot); - } + DPRINT1("FormatEx - FAT\n"); + VfatInitialize(); + VfatFormat( + &usDriveRoot, + MediaFlag, + &usLabel, + QuickFormat, + ClusterSize, + Callback); + VfatCleanup(); + RtlFreeUnicodeString(&usDriveRoot); } /* EOF */ diff --git a/reactos/dll/win32/fmifs/init.c b/reactos/dll/win32/fmifs/init.c index b0d5d230616..c82149d98ec 100644 --- a/reactos/dll/win32/fmifs/init.c +++ b/reactos/dll/win32/fmifs/init.c @@ -1,58 +1,56 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/init.c + * PURPOSE: Initialisation * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/init.c - * DESCRIPTION: File management IFS utility functions - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: Emanuele Aliberti */ + #include "precomp.h" -static BOOL FmIfsInitialized = FALSE; +static BOOLEAN FmIfsInitialized = FALSE; -static BOOL STDCALL -InitializeFmIfsOnce (VOID) +static BOOLEAN NTAPI +InitializeFmIfsOnce(void) { /* TODO: Check how many IFS are installed in the system */ /* TOSO: and register a descriptor for each one */ return TRUE; } - /* FMIFS.8 */ -BOOL STDCALL -InitializeFmIfs (PVOID hinstDll, - DWORD dwReason, - PVOID reserved) +BOOLEAN NTAPI +InitializeFmIfs( + IN PVOID hinstDll, + IN DWORD dwReason, + IN PVOID reserved) { - switch (dwReason) - { - case DLL_PROCESS_ATTACH: - if (FALSE == FmIfsInitialized) - { - if (FALSE == InitializeFmIfsOnce()) + switch (dwReason) { - return FALSE; + case DLL_PROCESS_ATTACH: + if (FALSE == FmIfsInitialized) + { + if (FALSE == InitializeFmIfsOnce()) + { + return FALSE; + } + + FmIfsInitialized = TRUE; + } + break; + + case DLL_THREAD_ATTACH: + break; + + case DLL_THREAD_DETACH: + break; + + case DLL_PROCESS_DETACH: + break; } - FmIfsInitialized = TRUE; - } - break; - - case DLL_THREAD_ATTACH: - break; - - case DLL_THREAD_DETACH: - break; - - case DLL_PROCESS_DETACH: - break; - } - - return TRUE; + return TRUE; } /* EOF */ diff --git a/reactos/dll/win32/fmifs/label.c b/reactos/dll/win32/fmifs/label.c index 1f150890ed9..e4b0ee48e10 100644 --- a/reactos/dll/win32/fmifs/label.c +++ b/reactos/dll/win32/fmifs/label.c @@ -1,18 +1,16 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/label.c + * PURPOSE: Set volume label * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/label.c - * DESCRIPTION: File management IFS utility functions - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: (none) */ + #include "precomp.h" /* FMIFS.10 */ -VOID STDCALL +VOID NTAPI SetLabel (VOID) { } diff --git a/reactos/dll/win32/fmifs/media.c b/reactos/dll/win32/fmifs/media.c index d8086578a3e..3837c99b2ff 100644 --- a/reactos/dll/win32/fmifs/media.c +++ b/reactos/dll/win32/fmifs/media.c @@ -1,19 +1,17 @@ -/* $Id$ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: File Management IFS Utility functions + * FILE: reactos/dll/win32/fmifs/media.c + * PURPOSE: Media * - * COPYING: See the top level directory - * PROJECT: ReactOS - * FILE: reactos/lib/fmifs/media.c - * DESCRIPTION: fmifs.dll - * PROGRAMMER: Emanuele Aliberti - * UPDATED - * 1999-02-16 (Emanuele Aliberti) - * Entry points added. + * PROGRAMMERS: (none) */ + #include "precomp.h" /* FMIFS.9 */ -VOID STDCALL -QuerySupportedMedia (VOID) +VOID NTAPI +QuerySupportedMedia(VOID) { } diff --git a/reactos/include/reactos/libs/fmifs/fmifs.h b/reactos/include/reactos/libs/fmifs/fmifs.h index 9f941920429..eb5daf8418f 100644 --- a/reactos/include/reactos/libs/fmifs/fmifs.h +++ b/reactos/include/reactos/libs/fmifs/fmifs.h @@ -130,7 +130,7 @@ EnableVolumeCompression( VOID NTAPI FormatEx( IN PWCHAR DriveRoot, - IN ULONG MediaFlag, + IN FMIFS_MEDIA_FLAG MediaFlag, IN PWCHAR Format, IN PWCHAR Label, IN BOOLEAN QuickFormat,