mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[CDFS]
- Add a basic CDFS filesystem library "cdfslib" for checking and formatting a CDFS volume. Checking is unimplemented and formatting not supported anyway :) - Use this library in the new "ucdfs" DLL and that DLL in "autochk". Fixes the "Unable to verify a CDFS volume" message at boot. - Return the right device type (FILE_DEVICE_CD_ROM or FILE_DEVICE_DISK) in when querying volume information in cdfs.sys to get the proper icon in Explorer. svn path=/trunk/; revision=75591
This commit is contained in:
parent
d31e5d598c
commit
fb160be266
10 changed files with 92 additions and 2 deletions
|
@ -283,7 +283,11 @@ LoadProvider(
|
|||
{
|
||||
RtlInitUnicodeString(&ProviderDll, L"uffs.dll");
|
||||
}
|
||||
else
|
||||
else if (wcscmp(FileSystem, L"CDFS") == 0)
|
||||
{
|
||||
RtlInitUnicodeString(&ProviderDll, L"ucdfs.dll");
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -206,6 +206,7 @@ add_subdirectory(themeui)
|
|||
add_subdirectory(traffic)
|
||||
add_subdirectory(twain_32)
|
||||
add_subdirectory(ubtrfs)
|
||||
add_subdirectory(ucdfs)
|
||||
add_subdirectory(uext2)
|
||||
add_subdirectory(ufat)
|
||||
add_subdirectory(ufatx)
|
||||
|
|
13
reactos/dll/win32/ucdfs/CMakeLists.txt
Normal file
13
reactos/dll/win32/ucdfs/CMakeLists.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
|
||||
spec2def(ucdfs.dll ucdfs.spec)
|
||||
|
||||
list(APPEND SOURCE
|
||||
ucdfs.c
|
||||
ucdfs.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/ucdfs.def)
|
||||
|
||||
add_library(ucdfs SHARED ${SOURCE})
|
||||
set_module_type(ucdfs nativedll)
|
||||
target_link_libraries(ucdfs cdfslib)
|
||||
add_importlibs(ucdfs ntdll)
|
||||
add_cd_file(TARGET ucdfs DESTINATION reactos/system32 FOR all)
|
20
reactos/dll/win32/ucdfs/ucdfs.c
Normal file
20
reactos/dll/win32/ucdfs/ucdfs.c
Normal file
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* PROJECT: CDFS File System Management
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: DLL Initialization
|
||||
* COPYRIGHT: Copyright 2017 Colin Finck <colin@reactos.org>
|
||||
*/
|
||||
|
||||
#include <windef.h>
|
||||
|
||||
INT WINAPI
|
||||
DllMain(IN HINSTANCE hinstDLL,
|
||||
IN DWORD dwReason,
|
||||
IN LPVOID lpvReserved)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(hinstDLL);
|
||||
UNREFERENCED_PARAMETER(dwReason);
|
||||
UNREFERENCED_PARAMETER(lpvReserved);
|
||||
|
||||
return TRUE;
|
||||
}
|
5
reactos/dll/win32/ucdfs/ucdfs.rc
Normal file
5
reactos/dll/win32/ucdfs/ucdfs.rc
Normal file
|
@ -0,0 +1,5 @@
|
|||
#define REACTOS_VERSION_DLL
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "CDFS File System Management"
|
||||
#define REACTOS_STR_INTERNAL_NAME "ucdfs"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "ucdfs.dll"
|
||||
#include <reactos/version.rc>
|
2
reactos/dll/win32/ucdfs/ucdfs.spec
Normal file
2
reactos/dll/win32/ucdfs/ucdfs.spec
Normal file
|
@ -0,0 +1,2 @@
|
|||
@ stdcall ChkdskEx(ptr long long long long ptr) CdfsChkdsk
|
||||
@ stdcall FormatEx(ptr long ptr long long ptr) CdfsFormat
|
|
@ -159,7 +159,11 @@ CdfsGetFsDeviceInformation(
|
|||
if (*BufferLength < sizeof(FILE_FS_DEVICE_INFORMATION))
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
|
||||
FsDeviceInfo->DeviceType = FILE_DEVICE_CD_ROM;
|
||||
if (DeviceObject->DeviceType == FILE_DEVICE_CD_ROM_FILE_SYSTEM)
|
||||
FsDeviceInfo->DeviceType = FILE_DEVICE_CD_ROM;
|
||||
else
|
||||
FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
|
||||
|
||||
FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
|
||||
|
||||
DPRINT("FsdGetFsDeviceInformation() finished.\n");
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
|
||||
add_subdirectory(btrfslib)
|
||||
add_subdirectory(cdfslib)
|
||||
add_subdirectory(ext2lib)
|
||||
add_subdirectory(ffslib)
|
||||
add_subdirectory(ntfslib)
|
||||
|
|
3
reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt
Normal file
3
reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
add_library(cdfslib cdfslib.c)
|
||||
add_dependencies(cdfslib psdk)
|
37
reactos/sdk/lib/fslib/cdfslib/cdfslib.c
Normal file
37
reactos/sdk/lib/fslib/cdfslib/cdfslib.c
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* PROJECT: ReactOS CDFS library
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: Checking and Formatting CDFS volumes
|
||||
* COPYRIGHT: Copyright 2017 Colin Finck <colin@reactos.org>
|
||||
*/
|
||||
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/umtypes.h>
|
||||
#include <fmifs/fmifs.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
NTSTATUS NTAPI
|
||||
CdfsChkdsk(IN PUNICODE_STRING DriveRoot,
|
||||
IN BOOLEAN FixErrors,
|
||||
IN BOOLEAN Verbose,
|
||||
IN BOOLEAN CheckOnlyIfDirty,
|
||||
IN BOOLEAN ScanDrive,
|
||||
IN PFMIFSCALLBACK Callback)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS NTAPI
|
||||
CdfsFormat(IN PUNICODE_STRING DriveRoot,
|
||||
IN FMIFS_MEDIA_FLAG MediaFlag,
|
||||
IN PUNICODE_STRING Label,
|
||||
IN BOOLEAN QuickFormat,
|
||||
IN ULONG ClusterSize,
|
||||
IN PFMIFSCALLBACK Callback)
|
||||
{
|
||||
// Not possible for CDFS (ISO-9660).
|
||||
return STATUS_NOT_SUPPORTED;
|
||||
}
|
Loading…
Reference in a new issue