File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -39,8 +39,7 @@ features = [
3939 " log_level_trace" ,
4040 " unicode" ,
4141]
42- git = " https://github.com/rafalh/rust-fatfs"
43- rev = " 4eccb50"
42+ git = " https://github.com/Josen-B/rust-fatfs.git"
4443
4544[dev-dependencies ]
4645axdriver = {workspace = true , features = [" block" , " ramdisk" ]}
Original file line number Diff line number Diff line change 1- use alloc:: boxed:: Box ;
21use alloc:: string:: ToString ;
32use alloc:: sync:: Arc ;
43use alloc:: vec:: Vec ;
Original file line number Diff line number Diff line change @@ -104,7 +104,9 @@ impl FatFileSystem {
104104 pub fn new ( mut disk : Disk ) -> Self {
105105 let opts = fatfs:: FormatVolumeOptions :: new ( ) ;
106106 fatfs:: format_volume ( & mut disk, opts) . expect ( "failed to format volume" ) ;
107- let inner = fatfs:: FileSystem :: new ( disk, fatfs:: FsOptions :: new ( ) )
107+ let disk_size = disk. size ( ) ;
108+ let wrapper = PartitionWrapper :: new ( crate :: dev:: Partition :: new ( disk, 0 , disk_size / 512 ) ) ;
109+ let inner = fatfs:: FileSystem :: new ( wrapper, fatfs:: FsOptions :: new ( ) )
108110 . expect ( "failed to initialize FAT filesystem" ) ;
109111
110112 Self {
You can’t perform that action at this time.
0 commit comments