https://git.reactos.org/?p=reactos.git;a=commitdiff;h=328cc411920816e5c1de5f12dc818fecbdb2767e

commit 328cc411920816e5c1de5f12dc818fecbdb2767e
Author:     Stanislav Motylkov <[email protected]>
AuthorDate: Sat Sep 24 16:52:14 2022 +0300
Commit:     Stanislav Motylkov <[email protected]>
CommitDate: Sat Sep 24 23:56:10 2022 +0300

    [FREELDR] Allow to boot from FATX volume using vfatfs driver
    
    Also copy vfatfs.sys to disk in 1st stage setup.
    CORE-16216 CORE-16329 CORE-16373
---
 boot/bootdata/txtsetup.sif        |  1 +
 boot/freeldr/freeldr/lib/fs/fat.c | 12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/boot/bootdata/txtsetup.sif b/boot/bootdata/txtsetup.sif
index 9b7e35d025e..96c55492e38 100644
--- a/boot/bootdata/txtsetup.sif
+++ b/boot/bootdata/txtsetup.sif
@@ -124,6 +124,7 @@ pci.sys      = 1,,,,,,x,4,,,,1,4
 scsiport.sys = 1,,,,,,,4,,,,1,4
 storport.sys = 1,,,,,,,4,,,,1,4
 fastfat.sys  = 1,,,,,,x,4,,,,1,4
+vfatfs.sys   = 1,,,,,,,4,,,,1,4
 btrfs.sys    = 1,,,,,,x,4,,,,1,4
 ramdisk.sys  = 1,,,,,,x,4,,,,1,4
 pciide.sys   = 1,,,,,,,4,,,,1,4
diff --git a/boot/freeldr/freeldr/lib/fs/fat.c 
b/boot/freeldr/freeldr/lib/fs/fat.c
index bcbc26123a6..a7495f17770 100644
--- a/boot/freeldr/freeldr/lib/fs/fat.c
+++ b/boot/freeldr/freeldr/lib/fs/fat.c
@@ -1547,6 +1547,16 @@ const DEVVTBL FatFuncTable =
     L"fastfat",
 };
 
+const DEVVTBL FatXFuncTable =
+{
+    FatClose,
+    FatGetFileInformation,
+    FatOpen,
+    FatRead,
+    FatSeek,
+    L"vfatfs",
+};
+
 const DEVVTBL* FatMount(ULONG DeviceId)
 {
     PFAT_VOLUME_INFO Volume;
@@ -1634,5 +1644,5 @@ const DEVVTBL* FatMount(ULONG DeviceId)
     // Return success
     //
     TRACE("FatMount(%lu) success\n", DeviceId);
-    return &FatFuncTable;
+    return (ISFATX(Volume->FatType) ? &FatXFuncTable : &FatFuncTable);
 }

Reply via email to