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({
8484 var stream = FS . getStreamChecked ( fd ) ;
8585 return fs . fstatSync ( stream . nfd ) ;
8686 } ,
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 ) ) ;
8996 } ,
90- statfsNode ( node ) {
91- return fs . statfsSync ( node . path ) ;
97+ statfsStream ( stream ) {
98+ return FS . statfs ( stream . path ) ;
9299 } ,
93100 chmod ( path , mode , dontFollow ) {
94101 mode &= { { { cDefs . S_IALLUGO } } } ;
Original file line number Diff line number Diff line change @@ -14426,7 +14426,7 @@ def test_unistd_sleep(self):
1442614426 def test_unistd_fstatfs(self):
1442714427 if '-DNODERAWFS' in self.cflags and WINDOWS:
1442814428 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'] )
1443014430
1443114431 @no_windows("test is Linux-specific")
1443214432 @no_mac("test is Linux-specific")
You can’t perform that action at this time.
0 commit comments