diff --git a/reactos/lib/fmifs/chkdsk.c b/reactos/lib/fmifs/chkdsk.c index 07846dfc9dc..834f778c4c9 100644 --- a/reactos/lib/fmifs/chkdsk.c +++ b/reactos/lib/fmifs/chkdsk.c @@ -1,4 +1,4 @@ -/* $Id: chkdsk.c,v 1.1 1999/05/11 21:19:41 ea Exp $ +/* $Id: chkdsk.c,v 1.2 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -16,37 +16,30 @@ /* FMIFS.1 */ -VOID -__stdcall -Chkdsk( - PWCHAR DriveRoot, +VOID STDCALL +Chkdsk (PWCHAR DriveRoot, PWCHAR Format, - BOOL CorrectErrors, - BOOL Verbose, - BOOL CheckOnlyIfDirty, - BOOL ScanDrive, - PVOID Unused2, + BOOLEAN CorrectErrors, + BOOLEAN Verbose, + BOOLEAN CheckOnlyIfDirty, + BOOLEAN ScanDrive, + PVOID Unused2, PVOID Unused3, - PFMIFSCALLBACK Callback - ) + PFMIFSCALLBACK Callback) { - BOOL 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 */ } /* FMIFS.2 (SP4 only?) */ -VOID -__stdcall -ChkdskEx(VOID) +VOID STDCALL +ChkdskEx (VOID) { } - /* EOF */ diff --git a/reactos/lib/fmifs/compress.c b/reactos/lib/fmifs/compress.c index 3dc431e0ead..c07e7e57484 100644 --- a/reactos/lib/fmifs/compress.c +++ b/reactos/lib/fmifs/compress.c @@ -1,4 +1,4 @@ -/* $Id: compress.c,v 1.1 1999/05/11 21:19:41 ea Exp $ +/* $Id: compress.c,v 1.2 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -16,15 +16,11 @@ /* FMIFS.4 */ -BOOL -__stdcall -EnableVolumeCompression( - PWCHAR DriveRoot, - BOOL Enable - ) +BOOLEAN STDCALL +EnableVolumeCompression (PWCHAR DriveRoot, + BOOLEAN Enable) { - return FALSE; + return FALSE; } - /* EOF */ diff --git a/reactos/lib/fmifs/diskcopy.c b/reactos/lib/fmifs/diskcopy.c index 63a89ce19a3..05c5d53f28b 100644 --- a/reactos/lib/fmifs/diskcopy.c +++ b/reactos/lib/fmifs/diskcopy.c @@ -1,4 +1,4 @@ -/* $Id: diskcopy.c,v 1.1 1999/05/11 21:19:41 ea Exp $ +/* $Id: diskcopy.c,v 1.2 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -15,9 +15,8 @@ #include /* FMIFS.3 */ -VOID -__stdcall -DiskCopy(VOID) +VOID STDCALL +DiskCopy (VOID) { } diff --git a/reactos/lib/fmifs/dllmain.c b/reactos/lib/fmifs/dllmain.c deleted file mode 100644 index 9c3c07d939c..00000000000 --- a/reactos/lib/fmifs/dllmain.c +++ /dev/null @@ -1,27 +0,0 @@ -/* $Id: dllmain.c,v 1.2 2000/04/25 23:22:53 ea Exp $ - * - * ReactOS FMIFS.DLL - */ -#include -BOOLEAN -__stdcall -DllMain( - PVOID hinstDll, - ULONG dwReason, - PVOID reserved - ) -{ - switch (dwReason) - { - case DLL_PROCESS_ATTACH: - break; - case DLL_THREAD_ATTACH: - break; - case DLL_THREAD_DETACH: - break; - case DLL_PROCESS_DETACH: - break; - } - return (TRUE); -} -/* EOF */ diff --git a/reactos/lib/fmifs/extend.c b/reactos/lib/fmifs/extend.c index d597f382d47..edc4334a92f 100644 --- a/reactos/lib/fmifs/extend.c +++ b/reactos/lib/fmifs/extend.c @@ -1,4 +1,4 @@ -/* $Id: extend.c,v 1.1 1999/05/11 21:19:41 ea Exp $ +/* $Id: extend.c,v 1.2 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -15,9 +15,8 @@ #include /* FMIFS.5 */ -VOID -__stdcall -Extend(VOID) +VOID STDCALL +Extend (VOID) { } diff --git a/reactos/lib/fmifs/fmifs.def b/reactos/lib/fmifs/fmifs.def index 01e3da501ed..ee15bacf61d 100644 --- a/reactos/lib/fmifs/fmifs.def +++ b/reactos/lib/fmifs/fmifs.def @@ -1,4 +1,4 @@ -; $Id: fmifs.def,v 1.5 2003/09/08 09:56:56 weiden Exp $ +; $Id: fmifs.def,v 1.6 2004/02/23 11:55:12 ekohl Exp $ ; ; fmifs.def ; @@ -21,7 +21,7 @@ Extend@0 Format@0 FormatEx@28 ;FormatEx2 -InitializeFmIfs@0 +InitializeFmIfs@12 ;QueryAvailableFileSystemFormat ;QueryDeviceInformation ;QueryDeviceInformationByHandle diff --git a/reactos/lib/fmifs/fmifs.edf b/reactos/lib/fmifs/fmifs.edf index b83f8c568b3..8b9deb9ed79 100644 --- a/reactos/lib/fmifs/fmifs.edf +++ b/reactos/lib/fmifs/fmifs.edf @@ -1,4 +1,4 @@ -; $Id: fmifs.edf,v 1.3 2003/09/08 09:56:56 weiden Exp $ +; $Id: fmifs.edf,v 1.4 2004/02/23 11:55:12 ekohl Exp $ ; ; fmifs.def ; @@ -21,7 +21,7 @@ Extend=Extend@0 Format=Format@0 FormatEx=FormatEx@28 ;FormatEx2 -InitializeFmIfs=InitializeFmIfs@0 +InitializeFmIfs=InitializeFmIfs@12 ;QueryAvailableFileSystemFormat ;QueryDeviceInformation ;QueryDeviceInformationByHandle diff --git a/reactos/lib/fmifs/format.c b/reactos/lib/fmifs/format.c index 30b2cceada4..667b6899a9d 100644 --- a/reactos/lib/fmifs/format.c +++ b/reactos/lib/fmifs/format.c @@ -1,4 +1,4 @@ -/* $Id: format.c,v 1.3 2003/09/12 17:51:46 vizzini Exp $ +/* $Id: format.c,v 1.4 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -21,51 +21,49 @@ /* FMIFS.6 */ -VOID -__stdcall -Format(VOID) +VOID STDCALL +Format (VOID) { } /* FMIFS.7 */ -VOID -__stdcall -FormatEx( - PWCHAR DriveRoot, - DWORD MediaFlag, - PWCHAR Format, - PWCHAR Label, - BOOL QuickFormat, - DWORD ClusterSize, - PFMIFSCALLBACK Callback - ) +VOID STDCALL +FormatEx (PWCHAR DriveRoot, + ULONG MediaFlag, + PWCHAR Format, + PWCHAR Label, + BOOLEAN QuickFormat, + ULONG ClusterSize, + PFMIFSCALLBACK Callback) { - UNICODE_STRING usDriveRoot; - UNICODE_STRING usLabel; - BOOL Argument = FALSE; + UNICODE_STRING usDriveRoot; + UNICODE_STRING usLabel; + BOOLEAN Argument = FALSE; - RtlInitUnicodeString(&usDriveRoot, DriveRoot); - RtlInitUnicodeString(&usLabel, Label); + RtlInitUnicodeString(&usDriveRoot, DriveRoot); + RtlInitUnicodeString(&usLabel, Label); - if (_wcsnicmp(Format, L"FAT", 3) == 0) - { - DPRINT1("FormatEx - FAT\n"); - VfatInitialize(); + if (_wcsnicmp(Format, L"FAT", 3) == 0) + { + DPRINT1("FormatEx - FAT\n"); - VfatFormat(&usDriveRoot, MediaFlag, &usLabel, QuickFormat, ClusterSize, Callback); - - VfatCleanup(); - } - else - { - /* Unknown file system */ - Callback(DONE, /* Command */ - 0, /* DWORD Modifier */ - &Argument /* Argument */ - ); - } + VfatInitialize (); + VfatFormat (&usDriveRoot, + MediaFlag, + &usLabel, + QuickFormat, + ClusterSize, + Callback); + VfatCleanup (); + } + else + { + /* Unknown file system */ + Callback (DONE, /* Command */ + 0, /* DWORD Modifier */ + &Argument); /* Argument */ + } } - /* EOF */ diff --git a/reactos/lib/fmifs/init.c b/reactos/lib/fmifs/init.c index dc98dbd4e4a..f1eb2bb11e6 100644 --- a/reactos/lib/fmifs/init.c +++ b/reactos/lib/fmifs/init.c @@ -1,4 +1,4 @@ -/* $Id: init.c,v 1.2 2002/03/07 00:24:24 ea Exp $ +/* $Id: init.c,v 1.3 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -14,7 +14,6 @@ #include #include -/* FMIFS.8 */ static BOOL FmIfsInitialized = FALSE; static BOOL STDCALL @@ -25,18 +24,38 @@ InitializeFmIfsOnce (VOID) return TRUE; } + +/* FMIFS.8 */ BOOL STDCALL -InitializeFmIfs(VOID) +InitializeFmIfs (PVOID hinstDll, + DWORD dwReason, + PVOID reserved) { - if (FALSE == FmIfsInitialized) + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + if (FALSE == FmIfsInitialized) + { + if (FALSE == InitializeFmIfsOnce()) { - if (FALSE == InitializeFmIfsOnce()) - { - return FALSE; - } - FmIfsInitialized = TRUE; + return FALSE; } - return TRUE; + + FmIfsInitialized = TRUE; + } + break; + + case DLL_THREAD_ATTACH: + break; + + case DLL_THREAD_DETACH: + break; + + case DLL_PROCESS_DETACH: + break; + } + + return TRUE; } /* EOF */ diff --git a/reactos/lib/fmifs/label.c b/reactos/lib/fmifs/label.c index 59449570631..dd311775bb0 100644 --- a/reactos/lib/fmifs/label.c +++ b/reactos/lib/fmifs/label.c @@ -1,4 +1,4 @@ -/* $Id: label.c,v 1.1 1999/05/11 21:19:41 ea Exp $ +/* $Id: label.c,v 1.2 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -16,11 +16,9 @@ /* FMIFS.10 */ -VOID -__stdcall -SetLabel(VOID) +VOID STDCALL +SetLabel (VOID) { } - /* EOF */ diff --git a/reactos/lib/fmifs/makefile b/reactos/lib/fmifs/makefile index 83e0f06be56..a04e7ea675b 100644 --- a/reactos/lib/fmifs/makefile +++ b/reactos/lib/fmifs/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.20 2003/09/12 17:51:46 vizzini Exp $ +# $Id: makefile,v 1.21 2004/02/23 11:55:12 ekohl Exp $ PATH_TO_TOP = ../.. @@ -8,21 +8,22 @@ TARGET_NAME = fmifs TARGET_BASE = 0x76df0000 +TARGET_ENTRY = _InitializeFmIfs@12 + TARGET_CFLAGS = -fno-builtin -Werror -Wall # require os code to explicitly request A/W version of structs/functions TARGET_CFLAGS += -D_DISABLE_TIDENTS -TARGET_LFLAGS = -nostdlib -nostartfiles +TARGET_LFLAGS = -nostartfiles TARGET_SDKLIBS = vfatlib.a ntdll.a kernel32.a TARGET_OBJECTS = \ - chkdsk.o \ - compress.o \ - diskcopy.o \ - dllmain.o \ - extend.o \ + chkdsk.o \ + compress.o \ + diskcopy.o \ + extend.o \ format.o \ init.o \ label.o \ diff --git a/reactos/lib/fmifs/media.c b/reactos/lib/fmifs/media.c index b52f543d287..98dc4709acd 100644 --- a/reactos/lib/fmifs/media.c +++ b/reactos/lib/fmifs/media.c @@ -1,4 +1,4 @@ -/* $Id: media.c,v 1.1 1999/05/11 21:19:41 ea Exp $ +/* $Id: media.c,v 1.2 2004/02/23 11:55:12 ekohl Exp $ * * COPYING: See the top level directory * PROJECT: ReactOS @@ -16,11 +16,9 @@ /* FMIFS.9 */ -VOID -__stdcall -QuerySupportedMedia(VOID) +VOID STDCALL +QuerySupportedMedia (VOID) { } - /* EOF */