File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
src/libstd/sys/redox/syscall Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,32 @@ impl DerefMut for Stat {
49
49
}
50
50
}
51
51
52
+ #[ derive( Copy , Clone , Debug , Default ) ]
53
+ #[ repr( packed) ]
54
+ pub struct StatVfs {
55
+ pub f_bsize : u32 ,
56
+ pub f_blocks : u64 ,
57
+ pub f_bfree : u64 ,
58
+ pub f_bavail : u64 ,
59
+ }
60
+
61
+ impl Deref for StatVfs {
62
+ type Target = [ u8 ] ;
63
+ fn deref ( & self ) -> & [ u8 ] {
64
+ unsafe {
65
+ slice:: from_raw_parts ( self as * const StatVfs as * const u8 , mem:: size_of :: < StatVfs > ( ) ) as & [ u8 ]
66
+ }
67
+ }
68
+ }
69
+
70
+ impl DerefMut for StatVfs {
71
+ fn deref_mut ( & mut self ) -> & mut [ u8 ] {
72
+ unsafe {
73
+ slice:: from_raw_parts_mut ( self as * mut StatVfs as * mut u8 , mem:: size_of :: < StatVfs > ( ) ) as & mut [ u8 ]
74
+ }
75
+ }
76
+ }
77
+
52
78
#[ derive( Copy , Clone , Debug , Default ) ]
53
79
#[ repr( packed) ]
54
80
pub struct TimeSpec {
You can’t perform that action at this time.
0 commit comments