From 14c39362513da8bd064a4816cb1fe5209398a881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Tue, 13 Sep 2022 22:31:22 +0200 Subject: [PATCH] [VFATFS] Add it back to build on XBOX, with the name vfatfs.sys Adapt some comments to new name. CORE-16373 --- drivers/filesystems/CMakeLists.txt | 2 +- drivers/filesystems/fastfat/CMakeLists.txt | 35 ----------------- drivers/filesystems/vfatfs/CMakeLists.txt | 38 +++++++++++++++++++ .../{fastfat => vfatfs}/blockdev.c | 0 .../filesystems/{fastfat => vfatfs}/cleanup.c | 0 .../filesystems/{fastfat => vfatfs}/close.c | 2 +- .../filesystems/{fastfat => vfatfs}/create.c | 2 +- drivers/filesystems/{fastfat => vfatfs}/dir.c | 0 .../{fastfat => vfatfs}/direntry.c | 0 .../filesystems/{fastfat => vfatfs}/dirwr.c | 2 +- drivers/filesystems/{fastfat => vfatfs}/ea.c | 0 .../filesystems/{fastfat => vfatfs}/fastio.c | 2 +- drivers/filesystems/{fastfat => vfatfs}/fat.c | 4 +- drivers/filesystems/{fastfat => vfatfs}/fcb.c | 2 +- .../filesystems/{fastfat => vfatfs}/finfo.c | 2 +- .../filesystems/{fastfat => vfatfs}/flush.c | 0 .../filesystems/{fastfat => vfatfs}/fsctl.c | 0 .../filesystems/{fastfat => vfatfs}/iface.c | 2 +- .../filesystems/{fastfat => vfatfs}/kdbg.c | 2 +- .../filesystems/{fastfat => vfatfs}/misc.c | 2 +- drivers/filesystems/{fastfat => vfatfs}/pnp.c | 2 +- drivers/filesystems/{fastfat => vfatfs}/rw.c | 2 +- .../{fastfat => vfatfs}/shutdown.c | 0 .../filesystems/{fastfat => vfatfs}/string.c | 0 .../filesystems/{fastfat => vfatfs}/vfat.h | 6 +-- .../{fastfat => vfatfs}/vfat005.1st | 0 .../{fastfat => vfatfs}/vfat_fr.txt | 0 .../filesystems/{fastfat => vfatfs}/vfatfs.rc | 0 drivers/filesystems/vfatfs/vfatfs_reg.inf | 7 ++++ .../filesystems/{fastfat => vfatfs}/volume.c | 0 30 files changed, 62 insertions(+), 52 deletions(-) delete mode 100644 drivers/filesystems/fastfat/CMakeLists.txt create mode 100644 drivers/filesystems/vfatfs/CMakeLists.txt rename drivers/filesystems/{fastfat => vfatfs}/blockdev.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/cleanup.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/close.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/create.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/dir.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/direntry.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/dirwr.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/ea.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/fastio.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/fat.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/fcb.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/finfo.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/flush.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/fsctl.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/iface.c (98%) rename drivers/filesystems/{fastfat => vfatfs}/kdbg.c (98%) rename drivers/filesystems/{fastfat => vfatfs}/misc.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/pnp.c (95%) rename drivers/filesystems/{fastfat => vfatfs}/rw.c (99%) rename drivers/filesystems/{fastfat => vfatfs}/shutdown.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/string.c (100%) rename drivers/filesystems/{fastfat => vfatfs}/vfat.h (99%) rename drivers/filesystems/{fastfat => vfatfs}/vfat005.1st (100%) rename drivers/filesystems/{fastfat => vfatfs}/vfat_fr.txt (100%) rename drivers/filesystems/{fastfat => vfatfs}/vfatfs.rc (100%) create mode 100644 drivers/filesystems/vfatfs/vfatfs_reg.inf rename drivers/filesystems/{fastfat => vfatfs}/volume.c (100%) diff --git a/drivers/filesystems/CMakeLists.txt b/drivers/filesystems/CMakeLists.txt index 471a7d873f5..05add682ad3 100644 --- a/drivers/filesystems/CMakeLists.txt +++ b/drivers/filesystems/CMakeLists.txt @@ -2,7 +2,6 @@ add_subdirectory(btrfs) add_subdirectory(cdfs) add_subdirectory(ext2) -#add_subdirectory(fastfat) add_subdirectory(fastfat_new) add_subdirectory(fs_rec) add_subdirectory(msfs) @@ -11,3 +10,4 @@ add_subdirectory(nfs) add_subdirectory(npfs) add_subdirectory(ntfs) add_subdirectory(udfs) +add_subdirectory(vfatfs) diff --git a/drivers/filesystems/fastfat/CMakeLists.txt b/drivers/filesystems/fastfat/CMakeLists.txt deleted file mode 100644 index 4eb78bf29a6..00000000000 --- a/drivers/filesystems/fastfat/CMakeLists.txt +++ /dev/null @@ -1,35 +0,0 @@ - -list(APPEND SOURCE - blockdev.c - cleanup.c - close.c - create.c - dir.c - direntry.c - dirwr.c - ea.c - fat.c - fastio.c - fcb.c - finfo.c - flush.c - fsctl.c - iface.c - kdbg.c - misc.c - pnp.c - rw.c - shutdown.c - string.c - volume.c - vfat.h) - -if(KDBG) - add_definitions(-DKDBG) -endif() -add_library(fastfat MODULE ${SOURCE} vfatfs.rc) -set_module_type(fastfat kernelmodedriver) -target_link_libraries(fastfat ${PSEH_LIB}) -add_importlibs(fastfat ntoskrnl hal) -add_pch(fastfat vfat.h SOURCE) -add_cd_file(TARGET fastfat DESTINATION reactos/system32/drivers NO_CAB FOR all) diff --git a/drivers/filesystems/vfatfs/CMakeLists.txt b/drivers/filesystems/vfatfs/CMakeLists.txt new file mode 100644 index 00000000000..7e0c7d56ee4 --- /dev/null +++ b/drivers/filesystems/vfatfs/CMakeLists.txt @@ -0,0 +1,38 @@ + +list(APPEND SOURCE + blockdev.c + cleanup.c + close.c + create.c + dir.c + direntry.c + dirwr.c + ea.c + fat.c + fastio.c + fcb.c + finfo.c + flush.c + fsctl.c + iface.c + kdbg.c + misc.c + pnp.c + rw.c + shutdown.c + string.c + volume.c + vfat.h) + +if(KDBG) + add_definitions(-DKDBG) +endif() +add_library(vfatfs MODULE ${SOURCE} vfatfs.rc) +set_module_type(vfatfs kernelmodedriver) +target_link_libraries(vfatfs ${PSEH_LIB}) +add_importlibs(vfatfs ntoskrnl hal) +add_pch(vfatfs vfat.h SOURCE) +if(SARCH STREQUAL "xbox") + add_cd_file(TARGET vfatfs DESTINATION reactos/system32/drivers NO_CAB FOR all) + add_registry_inf(vfatfs_reg.inf) +endif() diff --git a/drivers/filesystems/fastfat/blockdev.c b/drivers/filesystems/vfatfs/blockdev.c similarity index 100% rename from drivers/filesystems/fastfat/blockdev.c rename to drivers/filesystems/vfatfs/blockdev.c diff --git a/drivers/filesystems/fastfat/cleanup.c b/drivers/filesystems/vfatfs/cleanup.c similarity index 100% rename from drivers/filesystems/fastfat/cleanup.c rename to drivers/filesystems/vfatfs/cleanup.c diff --git a/drivers/filesystems/fastfat/close.c b/drivers/filesystems/vfatfs/close.c similarity index 99% rename from drivers/filesystems/fastfat/close.c rename to drivers/filesystems/vfatfs/close.c index 57efdad97a6..aa19c1ed505 100644 --- a/drivers/filesystems/fastfat/close.c +++ b/drivers/filesystems/vfatfs/close.c @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/filesystems/fastfat/close.c + * FILE: drivers/filesystems/vfatfs/close.c * PURPOSE: VFAT Filesystem * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com) * Pierre Schweitzer (pierre@reactos.org) diff --git a/drivers/filesystems/fastfat/create.c b/drivers/filesystems/vfatfs/create.c similarity index 99% rename from drivers/filesystems/fastfat/create.c rename to drivers/filesystems/vfatfs/create.c index 0de08a9dd78..32c39f11361 100644 --- a/drivers/filesystems/fastfat/create.c +++ b/drivers/filesystems/vfatfs/create.c @@ -18,7 +18,7 @@ */ /* * PROJECT: ReactOS kernel - * FILE: drivers/filesystems/fastfat/create.c + * FILE: drivers/filesystems/vfatfs/create.c * PURPOSE: VFAT Filesystem * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com) * Pierre Schweitzer (pierre@reactos.org) diff --git a/drivers/filesystems/fastfat/dir.c b/drivers/filesystems/vfatfs/dir.c similarity index 100% rename from drivers/filesystems/fastfat/dir.c rename to drivers/filesystems/vfatfs/dir.c diff --git a/drivers/filesystems/fastfat/direntry.c b/drivers/filesystems/vfatfs/direntry.c similarity index 100% rename from drivers/filesystems/fastfat/direntry.c rename to drivers/filesystems/vfatfs/direntry.c diff --git a/drivers/filesystems/fastfat/dirwr.c b/drivers/filesystems/vfatfs/dirwr.c similarity index 99% rename from drivers/filesystems/fastfat/dirwr.c rename to drivers/filesystems/vfatfs/dirwr.c index e7a260422ce..99d4f8946a0 100644 --- a/drivers/filesystems/fastfat/dirwr.c +++ b/drivers/filesystems/vfatfs/dirwr.c @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/filesystems/fastfat/dirwr.c + * FILE: drivers/filesystems/vfatfs/dirwr.c * PURPOSE: VFAT Filesystem : write in directory * PROGRAMMER: Rex Jolliff (rex@lvcablemodem.com) * Herve Poussineau (reactos@poussine.freesurf.fr) diff --git a/drivers/filesystems/fastfat/ea.c b/drivers/filesystems/vfatfs/ea.c similarity index 100% rename from drivers/filesystems/fastfat/ea.c rename to drivers/filesystems/vfatfs/ea.c diff --git a/drivers/filesystems/fastfat/fastio.c b/drivers/filesystems/vfatfs/fastio.c similarity index 99% rename from drivers/filesystems/fastfat/fastio.c rename to drivers/filesystems/vfatfs/fastio.c index 6404ab448ae..5db742b3a7c 100644 --- a/drivers/filesystems/fastfat/fastio.c +++ b/drivers/filesystems/vfatfs/fastio.c @@ -1,5 +1,5 @@ /* - * FILE: drivers/filesystems/fastfat/fastio.c + * FILE: drivers/filesystems/vfatfs/fastio.c * PURPOSE: Fast IO routines. * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel diff --git a/drivers/filesystems/fastfat/fat.c b/drivers/filesystems/vfatfs/fat.c similarity index 99% rename from drivers/filesystems/fastfat/fat.c rename to drivers/filesystems/vfatfs/fat.c index b6e62c68fcc..e32f279991f 100644 --- a/drivers/filesystems/fastfat/fat.c +++ b/drivers/filesystems/vfatfs/fat.c @@ -1,8 +1,8 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/filesystems/fastfat/fat.c - * PURPOSE: FastFAT Filesystem + * FILE: drivers/filesystems/vfatfs/fat.c + * PURPOSE: VFAT Filesystem * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com) * Pierre Schweitzer (pierre@reactos.org) * diff --git a/drivers/filesystems/fastfat/fcb.c b/drivers/filesystems/vfatfs/fcb.c similarity index 99% rename from drivers/filesystems/fastfat/fcb.c rename to drivers/filesystems/vfatfs/fcb.c index a791c27a40d..6fd76071678 100644 --- a/drivers/filesystems/fastfat/fcb.c +++ b/drivers/filesystems/vfatfs/fcb.c @@ -1,5 +1,5 @@ /* -* FILE: drivers/filesystems/fastfat/fcb.c +* FILE: drivers/filesystems/vfatfs/fcb.c * PURPOSE: Routines to manipulate FCBs. * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel diff --git a/drivers/filesystems/fastfat/finfo.c b/drivers/filesystems/vfatfs/finfo.c similarity index 99% rename from drivers/filesystems/fastfat/finfo.c rename to drivers/filesystems/vfatfs/finfo.c index ab5591e4b12..a4ddc72f6bb 100644 --- a/drivers/filesystems/fastfat/finfo.c +++ b/drivers/filesystems/vfatfs/finfo.c @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/filesystems/fastfat/finfo.c + * FILE: drivers/filesystems/vfatfs/finfo.c * PURPOSE: VFAT Filesystem * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com) * Herve Poussineau (reactos@poussine.freesurf.fr) diff --git a/drivers/filesystems/fastfat/flush.c b/drivers/filesystems/vfatfs/flush.c similarity index 100% rename from drivers/filesystems/fastfat/flush.c rename to drivers/filesystems/vfatfs/flush.c diff --git a/drivers/filesystems/fastfat/fsctl.c b/drivers/filesystems/vfatfs/fsctl.c similarity index 100% rename from drivers/filesystems/fastfat/fsctl.c rename to drivers/filesystems/vfatfs/fsctl.c diff --git a/drivers/filesystems/fastfat/iface.c b/drivers/filesystems/vfatfs/iface.c similarity index 98% rename from drivers/filesystems/fastfat/iface.c rename to drivers/filesystems/vfatfs/iface.c index 9b3294211f3..d09365d09f5 100644 --- a/drivers/filesystems/fastfat/iface.c +++ b/drivers/filesystems/vfatfs/iface.c @@ -154,7 +154,7 @@ DriverEntry( BOOLEAN Registered; Registered = KdRosRegisterCliCallback(vfatKdbgHandler); - DPRINT1("FastFAT KDBG extension registered: %s\n", (Registered ? "yes" : "no")); + DPRINT1("VFATFS KDBG extension registered: %s\n", (Registered ? "yes" : "no")); } #endif diff --git a/drivers/filesystems/fastfat/kdbg.c b/drivers/filesystems/vfatfs/kdbg.c similarity index 98% rename from drivers/filesystems/fastfat/kdbg.c rename to drivers/filesystems/vfatfs/kdbg.c index ef2ded50de4..3582c7dcdae 100644 --- a/drivers/filesystems/fastfat/kdbg.c +++ b/drivers/filesystems/vfatfs/kdbg.c @@ -1,5 +1,5 @@ /* -* FILE: drivers/filesystems/fastfat/kdbg.c +* FILE: drivers/filesystems/vfatfs/kdbg.c * PURPOSE: KDBG extension. * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel diff --git a/drivers/filesystems/fastfat/misc.c b/drivers/filesystems/vfatfs/misc.c similarity index 99% rename from drivers/filesystems/fastfat/misc.c rename to drivers/filesystems/vfatfs/misc.c index 76b17f1db36..127851ba9bf 100644 --- a/drivers/filesystems/fastfat/misc.c +++ b/drivers/filesystems/vfatfs/misc.c @@ -518,7 +518,7 @@ VfatCheckForDismount( * It seems to be related to the fact that the volume root directory as * well as auxiliary data stream(s) are still opened, and only these are * allowed to be opened at that moment. After analysis it appears that for - * the ReactOS' fastfat, this number is equal to "2". + * the ReactOS' vfatfs, this number is equal to "2". */ UnCleanCount = 2; diff --git a/drivers/filesystems/fastfat/pnp.c b/drivers/filesystems/vfatfs/pnp.c similarity index 95% rename from drivers/filesystems/fastfat/pnp.c rename to drivers/filesystems/vfatfs/pnp.c index afc02f9c89a..6a07e7e90a2 100644 --- a/drivers/filesystems/fastfat/pnp.c +++ b/drivers/filesystems/vfatfs/pnp.c @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/filesystems/fastfat/pnp.c + * FILE: drivers/filesystems/vfatfs/pnp.c * PURPOSE: VFAT Filesystem * PROGRAMMER: Pierre Schweitzer * diff --git a/drivers/filesystems/fastfat/rw.c b/drivers/filesystems/vfatfs/rw.c similarity index 99% rename from drivers/filesystems/fastfat/rw.c rename to drivers/filesystems/vfatfs/rw.c index 0afebafe893..66caebdc850 100644 --- a/drivers/filesystems/fastfat/rw.c +++ b/drivers/filesystems/vfatfs/rw.c @@ -1,7 +1,7 @@ /* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: drivers/filesystems/fastfat/rw.c + * FILE: drivers/filesystems/vfatfs/rw.c * PURPOSE: VFAT Filesystem * PROGRAMMER: Jason Filby (jasonfilby@yahoo.com) * Pierre Schweitzer (pierre@reactos.org) diff --git a/drivers/filesystems/fastfat/shutdown.c b/drivers/filesystems/vfatfs/shutdown.c similarity index 100% rename from drivers/filesystems/fastfat/shutdown.c rename to drivers/filesystems/vfatfs/shutdown.c diff --git a/drivers/filesystems/fastfat/string.c b/drivers/filesystems/vfatfs/string.c similarity index 100% rename from drivers/filesystems/fastfat/string.c rename to drivers/filesystems/vfatfs/string.c diff --git a/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/vfatfs/vfat.h similarity index 99% rename from drivers/filesystems/fastfat/vfat.h rename to drivers/filesystems/vfatfs/vfat.h index 4e51b5ce34a..a40fcd82cf3 100644 --- a/drivers/filesystems/fastfat/vfat.h +++ b/drivers/filesystems/vfatfs/vfat.h @@ -1,5 +1,5 @@ -#ifndef _FASTFAT_PCH_ -#define _FASTFAT_PCH_ +#ifndef _VFATFS_PCH_ +#define _VFATFS_PCH_ #include #include @@ -1241,4 +1241,4 @@ NTSTATUS VfatSetVolumeInformation( PVFAT_IRP_CONTEXT IrpContext); -#endif /* _FASTFAT_PCH_ */ +#endif /* _VFATFS_PCH_ */ diff --git a/drivers/filesystems/fastfat/vfat005.1st b/drivers/filesystems/vfatfs/vfat005.1st similarity index 100% rename from drivers/filesystems/fastfat/vfat005.1st rename to drivers/filesystems/vfatfs/vfat005.1st diff --git a/drivers/filesystems/fastfat/vfat_fr.txt b/drivers/filesystems/vfatfs/vfat_fr.txt similarity index 100% rename from drivers/filesystems/fastfat/vfat_fr.txt rename to drivers/filesystems/vfatfs/vfat_fr.txt diff --git a/drivers/filesystems/fastfat/vfatfs.rc b/drivers/filesystems/vfatfs/vfatfs.rc similarity index 100% rename from drivers/filesystems/fastfat/vfatfs.rc rename to drivers/filesystems/vfatfs/vfatfs.rc diff --git a/drivers/filesystems/vfatfs/vfatfs_reg.inf b/drivers/filesystems/vfatfs/vfatfs_reg.inf new file mode 100644 index 00000000000..ffa46498522 --- /dev/null +++ b/drivers/filesystems/vfatfs/vfatfs_reg.inf @@ -0,0 +1,7 @@ +; Virtual FATX filesystem driver +[AddReg] +HKLM,"SYSTEM\CurrentControlSet\Services\vfatfs","ErrorControl",0x00010001,0x00000001 +HKLM,"SYSTEM\CurrentControlSet\Services\vfatfs","Group",0x00000000,"Boot File System" +HKLM,"SYSTEM\CurrentControlSet\Services\vfatfs","ImagePath",0x00020000,"system32\drivers\vfatfs.sys" +HKLM,"SYSTEM\CurrentControlSet\Services\vfatfs","Start",0x00010001,0x00000003 +HKLM,"SYSTEM\CurrentControlSet\Services\vfatfs","Type",0x00010001,0x00000002 diff --git a/drivers/filesystems/fastfat/volume.c b/drivers/filesystems/vfatfs/volume.c similarity index 100% rename from drivers/filesystems/fastfat/volume.c rename to drivers/filesystems/vfatfs/volume.c