File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -84,11 +84,18 @@ addToLibrary({
84
84
var stream = FS . getStreamChecked ( fd ) ;
85
85
return fs . fstatSync ( stream . nfd ) ;
86
86
} ,
87
- statfsStream ( stream ) {
88
- return fs . statfsSync ( stream . path ) ;
87
+ statfs ( path ) {
88
+ // Node's fs.statfsSync API doesn't provide these attributes so include
89
+ // some defaults.
90
+ var defaults = {
91
+ fsid : 42 ,
92
+ flags : 2 ,
93
+ namelen : 255 ,
94
+ }
95
+ return Object . assign ( defaults , fs . statfsSync ( path ) ) ;
89
96
} ,
90
- statfsNode ( node ) {
91
- return fs . statfsSync ( node . path ) ;
97
+ statfsStream ( stream ) {
98
+ return FS . statfs ( stream . path ) ;
92
99
} ,
93
100
chmod ( path , mode , dontFollow ) {
94
101
mode &= { { { cDefs . S_IALLUGO } } } ;
Original file line number Diff line number Diff line change @@ -14426,7 +14426,7 @@ def test_unistd_sleep(self):
14426
14426
def test_unistd_fstatfs(self):
14427
14427
if '-DNODERAWFS' in self.cflags and WINDOWS:
14428
14428
self.skipTest('Cannot look up /dev/stdout on windows')
14429
- self.do_run_in_out_file_test('unistd/fstatfs.c')
14429
+ self.do_run_in_out_file_test('unistd/fstatfs.c', cflags=['-sASSERTIONS=2'] )
14430
14430
14431
14431
@no_windows("test is Linux-specific")
14432
14432
@no_mac("test is Linux-specific")
You can’t perform that action at this time.
0 commit comments