File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ use alloc::sync::Arc;
88use alloc:: vec:: Vec ;
99use core:: marker:: PhantomData ;
1010use core:: mem:: MaybeUninit ;
11+ use core:: sync:: atomic:: { AtomicU64 , Ordering } ;
1112use core:: { mem, ptr} ;
1213
1314use align_address:: Align ;
@@ -36,6 +37,8 @@ impl RomFileInner {
3637 }
3738}
3839
40+ static VFS_INO_NUM : AtomicU64 = AtomicU64 :: new ( 10_000 ) ;
41+
3942pub struct RomFileInterface {
4043 /// Position within the file
4144 pos : Mutex < usize > ,
@@ -306,6 +309,7 @@ impl RomFile {
306309 st_atim : t,
307310 st_mtim : t,
308311 st_ctim : t,
312+ st_ino : VFS_INO_NUM . fetch_add ( 1 , Ordering :: AcqRel ) ,
309313 ..Default :: default ( )
310314 } ;
311315
@@ -361,6 +365,9 @@ impl RamFile {
361365 st_atim : t,
362366 st_mtim : t,
363367 st_ctim : t,
368+ st_nlink : 1 ,
369+ st_blksize : 4096 ,
370+ st_ino : VFS_INO_NUM . fetch_add ( 1 , Ordering :: AcqRel ) ,
364371 ..Default :: default ( )
365372 } ;
366373
You can’t perform that action at this time.
0 commit comments