mirror of
https://github.com/reactos/reactos.git
synced 2024-10-31 03:48:17 +00:00
8d3e80e437
[AUTOCHK] Add also support for scanning FATX volumes. The Format(), FormatEx(), Chkdsk(), ChkdskEx() functions exposed by the U*.DLL user-mode FS library dlls are different (and have different prototypes) than the similarly-named functions exported by FMIFS.DLL . In particular, what we used to call "xxxChkdskEx()" and "xxxFormatEx()" in our U*.DLL libraries actually correspond more, from their arguments, to the "Chkdsk()" and "Format()" functions in Windows' U*.DLL . Their *Ex() counterparts instead take most of the parameters through a structure passed by pointer. On FMIFS.DLL side, while FMIFS!Chkdsk() calls U*.DLL!Chkdsk() and FMIFS!ChkdskEx() calls U*.DLL!ChkdskEx() (and we do not implement these *Ex() functions at the moment), both FMIFS!Format() and FMIFS!FormatEx() call U*.DLL!Format() instead, while FMIFS!FormatEx2() calls U*.DLL!FormatEx() (that we do not implement yet either) !! To improve that, refactor the calls to these U*.DLL functions so as to respect the more compatible prototypes: They contain the correct number of parameters in a compatible order. However, some of the parameters do not have the same types yet: the strings are kept here in PUNICODE_STRINGS, while on Windows they are passed via an undocumented DSTRING struct, and the FMIFS callback is instead a MESSAGE struct/class on Windows. Finally, the MEDIA_TYPE parameter in U*.DLL!Format() is equivalent, yet not fully 100% in 1-to-1 correspondence, with the FMIFS_MEDIA_FLAG used in the corresponding FMIFS.DLL functions. One thing to notice is that the U*.DLL!Format() (and the Ex) functions support a BOOLEAN (a flag resp.) for telling that a backwards-compatible FS version should be used instead of the (default) latest FS version. This is used e.g. by the FAT FS, where by default FAT32 is selected (depending also on other constraints like, the disk and the partition sizes), unless that bit is set in which case, FAT16 (or 12) is used.
51 lines
1 KiB
C
51 lines
1 KiB
C
/*
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
* PROJECT: File Management IFS Utility functions
|
|
* FILE: reactos/dll/win32/fmifs/precomp.h
|
|
* PURPOSE: Win32 FMIFS API Library Header
|
|
*
|
|
* PROGRAMMERS: Alex Ionescu (alex@relsoft.net)
|
|
* Hervé Poussineau (hpoussin@reactos.org)
|
|
*/
|
|
|
|
#ifndef _FMIFS_PCH_
|
|
#define _FMIFS_PCH_
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
#include <stdio.h>
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
/* PSDK/NDK Headers */
|
|
#include <windef.h>
|
|
#include <winbase.h>
|
|
|
|
#define NTOS_MODE_USER
|
|
#include <ndk/rtlfuncs.h>
|
|
|
|
/* FMIFS Public Header */
|
|
#include <fmifs/fmifs.h>
|
|
|
|
extern LIST_ENTRY ProviderListHead;
|
|
|
|
typedef struct _IFS_PROVIDER
|
|
{
|
|
LIST_ENTRY ListEntry;
|
|
|
|
PULIB_CHKDSK Chkdsk;
|
|
PVOID ChkdskEx;
|
|
PVOID Extend;
|
|
PULIB_FORMAT Format;
|
|
PVOID FormatEx;
|
|
|
|
WCHAR Name[1];
|
|
} IFS_PROVIDER, *PIFS_PROVIDER;
|
|
|
|
/* init.c */
|
|
PIFS_PROVIDER
|
|
GetProvider(
|
|
IN PWCHAR FileSytem);
|
|
|
|
#endif /* _FMIFS_PCH_ */
|