@@ -600,13 +600,16 @@ impl Attr {
600600 atimensec : st. st_atime_nsec as u32 ,
601601 mtimensec : st. st_mtime_nsec as u32 ,
602602 ctimensec : st. st_ctime_nsec as u32 ,
603+ #[ cfg( target_os = "linux" ) ]
604+ mode : st. st_mode ,
605+ #[ cfg( target_os = "macos" ) ]
603606 mode : st. st_mode as u32 ,
604607 nlink : st. st_nlink as u32 ,
605608 uid : st. st_uid ,
606609 gid : st. st_gid ,
607610 rdev : st. st_rdev as u32 ,
608611 blksize : st. st_blksize as u32 ,
609- flags : flags as u32 ,
612+ flags,
610613 #[ cfg( target_os = "macos" ) ]
611614 crtime : 0 ,
612615 #[ cfg( target_os = "macos" ) ]
@@ -658,6 +661,22 @@ pub struct Kstatfs {
658661unsafe impl ByteValued for Kstatfs { }
659662
660663impl From < statvfs64 > for Kstatfs {
664+ #[ cfg( target_os = "linux" ) ]
665+ fn from ( st : statvfs64 ) -> Self {
666+ Kstatfs {
667+ blocks : st. f_blocks ,
668+ bfree : st. f_bfree ,
669+ bavail : st. f_bavail ,
670+ files : st. f_files ,
671+ ffree : st. f_ffree ,
672+ bsize : st. f_bsize as u32 ,
673+ namelen : st. f_namemax as u32 ,
674+ frsize : st. f_frsize as u32 ,
675+ ..Default :: default ( )
676+ }
677+ }
678+
679+ #[ cfg( target_os = "macos" ) ]
661680 fn from ( st : statvfs64 ) -> Self {
662681 Kstatfs {
663682 blocks : st. f_blocks as u64 ,
@@ -745,7 +764,7 @@ impl From<u32> for Opcode {
745764 if op >= Opcode :: MaxOpcode as u32 {
746765 return Opcode :: MaxOpcode ;
747766 }
748- unsafe { mem:: transmute ( op as u32 ) }
767+ unsafe { mem:: transmute ( op) }
749768 }
750769}
751770
0 commit comments