Author: cfinck
Date: Thu Aug 17 12:21:27 2017
New Revision: 75591
URL:
http://svn.reactos.org/svn/reactos?rev=75591&view=rev
Log:
[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.
Added:
trunk/reactos/dll/win32/ucdfs/
trunk/reactos/dll/win32/ucdfs/CMakeLists.txt (with props)
trunk/reactos/dll/win32/ucdfs/ucdfs.c (with props)
trunk/reactos/dll/win32/ucdfs/ucdfs.rc (with props)
trunk/reactos/dll/win32/ucdfs/ucdfs.spec (with props)
trunk/reactos/sdk/lib/fslib/cdfslib/
trunk/reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt (with props)
trunk/reactos/sdk/lib/fslib/cdfslib/cdfslib.c (with props)
Modified:
trunk/reactos/base/system/autochk/autochk.c
trunk/reactos/dll/win32/CMakeLists.txt
trunk/reactos/drivers/filesystems/cdfs/volinfo.c
trunk/reactos/sdk/lib/fslib/CMakeLists.txt
Modified: trunk/reactos/base/system/autochk/autochk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/autochk/autoch…
==============================================================================
--- trunk/reactos/base/system/autochk/autochk.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/autochk/autochk.c [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -283,7 +283,11 @@
{
RtlInitUnicodeString(&ProviderDll, L"uffs.dll");
}
- else
+ else if (wcscmp(FileSystem, L"CDFS") == 0)
+ {
+ RtlInitUnicodeString(&ProviderDll, L"ucdfs.dll");
+ }
+ else
{
return NULL;
}
Modified: trunk/reactos/dll/win32/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/CMakeLists.txt?r…
==============================================================================
--- trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/CMakeLists.txt [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -206,6 +206,7 @@
add_subdirectory(traffic)
add_subdirectory(twain_32)
add_subdirectory(ubtrfs)
+add_subdirectory(ucdfs)
add_subdirectory(uext2)
add_subdirectory(ufat)
add_subdirectory(ufatx)
Added: trunk/reactos/dll/win32/ucdfs/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ucdfs/CMakeLists…
==============================================================================
--- trunk/reactos/dll/win32/ucdfs/CMakeLists.txt (added)
+++ trunk/reactos/dll/win32/ucdfs/CMakeLists.txt [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -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)
Propchange: trunk/reactos/dll/win32/ucdfs/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/ucdfs/ucdfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ucdfs/ucdfs.c?re…
==============================================================================
--- trunk/reactos/dll/win32/ucdfs/ucdfs.c (added)
+++ trunk/reactos/dll/win32/ucdfs/ucdfs.c [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -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(a)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;
+}
Propchange: trunk/reactos/dll/win32/ucdfs/ucdfs.c
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/ucdfs/ucdfs.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ucdfs/ucdfs.rc?r…
==============================================================================
--- trunk/reactos/dll/win32/ucdfs/ucdfs.rc (added)
+++ trunk/reactos/dll/win32/ucdfs/ucdfs.rc [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -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>
Propchange: trunk/reactos/dll/win32/ucdfs/ucdfs.rc
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/dll/win32/ucdfs/ucdfs.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ucdfs/ucdfs.spec…
==============================================================================
--- trunk/reactos/dll/win32/ucdfs/ucdfs.spec (added)
+++ trunk/reactos/dll/win32/ucdfs/ucdfs.spec [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -0,0 +1,2 @@
+@ stdcall ChkdskEx(ptr long long long long ptr) CdfsChkdsk
+@ stdcall FormatEx(ptr long ptr long long ptr) CdfsFormat
Propchange: trunk/reactos/dll/win32/ucdfs/ucdfs.spec
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/drivers/filesystems/cdfs/volinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/v…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/volinfo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/volinfo.c [iso-8859-1] Thu Aug 17 12:21:27
2017
@@ -159,7 +159,11 @@
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");
Modified: trunk/reactos/sdk/lib/fslib/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/fslib/CMakeLists.t…
==============================================================================
--- trunk/reactos/sdk/lib/fslib/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/fslib/CMakeLists.txt [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -1,5 +1,6 @@
add_subdirectory(btrfslib)
+add_subdirectory(cdfslib)
add_subdirectory(ext2lib)
add_subdirectory(ffslib)
add_subdirectory(ntfslib)
Added: trunk/reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/fslib/cdfslib/CMak…
==============================================================================
--- trunk/reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt (added)
+++ trunk/reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt [iso-8859-1] Thu Aug 17 12:21:27
2017
@@ -0,0 +1,3 @@
+
+add_library(cdfslib cdfslib.c)
+add_dependencies(cdfslib psdk)
Propchange: trunk/reactos/sdk/lib/fslib/cdfslib/CMakeLists.txt
------------------------------------------------------------------------------
svn:eol-style = native
Added: trunk/reactos/sdk/lib/fslib/cdfslib/cdfslib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/fslib/cdfslib/cdfs…
==============================================================================
--- trunk/reactos/sdk/lib/fslib/cdfslib/cdfslib.c (added)
+++ trunk/reactos/sdk/lib/fslib/cdfslib/cdfslib.c [iso-8859-1] Thu Aug 17 12:21:27 2017
@@ -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(a)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;
+}
Propchange: trunk/reactos/sdk/lib/fslib/cdfslib/cdfslib.c
------------------------------------------------------------------------------
svn:eol-style = native