@@ -422,7 +422,9 @@ impl Statfs {
422422 target_os = "macos" ,
423423 target_os = "android" ,
424424 target_os = "freebsd" ,
425+ target_os = "fuchsia" ,
425426 target_os = "openbsd" ,
427+ target_os = "linux" ,
426428 ) ) ]
427429 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
428430 pub fn blocks ( & self ) -> u64 {
@@ -437,24 +439,9 @@ impl Statfs {
437439 }
438440
439441 /// Total data blocks in filesystem
440- #[ cfg( all ( target_os = "linux" , any ( target_env = "musl" , target_arch = "riscv32" , all ( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ) ]
442+ #[ cfg( target_os = "emscripten" ) ]
441443 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
442- pub fn blocks ( & self ) -> u64 {
443- self . 0 . f_blocks
444- }
445-
446- /// Total data blocks in filesystem
447- #[ cfg( not( any(
448- target_os = "ios" ,
449- target_os = "macos" ,
450- target_os = "android" ,
451- target_os = "freebsd" ,
452- target_os = "openbsd" ,
453- target_os = "dragonfly" ,
454- all( target_os = "linux" , any( target_env = "musl" , target_arch = "riscv32" , all( target_arch = "x86_64" , target_pointer_width = "32" ) ) )
455- ) ) ) ]
456- #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
457- pub fn blocks ( & self ) -> libc:: c_ulong {
444+ pub fn blocks ( & self ) -> u32 {
458445 self . 0 . f_blocks
459446 }
460447
@@ -464,7 +451,9 @@ impl Statfs {
464451 target_os = "macos" ,
465452 target_os = "android" ,
466453 target_os = "freebsd" ,
454+ target_os = "fuchsia" ,
467455 target_os = "openbsd" ,
456+ target_os = "linux" ,
468457 ) ) ]
469458 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
470459 pub fn blocks_free ( & self ) -> u64 {
@@ -479,29 +468,20 @@ impl Statfs {
479468 }
480469
481470 /// Free blocks in filesystem
482- #[ cfg( all ( target_os = "linux" , any ( target_env = "musl" , target_arch = "riscv32" , all ( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ) ]
471+ #[ cfg( target_os = "emscripten" ) ]
483472 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
484- pub fn blocks_free ( & self ) -> u64 {
473+ pub fn blocks_free ( & self ) -> u32 {
485474 self . 0 . f_bfree
486475 }
487476
488- /// Free blocks in filesystem
489- #[ cfg( not ( any(
477+ /// Free blocks available to unprivileged user
478+ #[ cfg( any(
490479 target_os = "ios" ,
491480 target_os = "macos" ,
492481 target_os = "android" ,
493- target_os = "freebsd" ,
494- target_os = "openbsd" ,
495- target_os = "dragonfly" ,
496- all( target_os = "linux" , any( target_env = "musl" , target_arch = "riscv32" , all( target_arch = "x86_64" , target_pointer_width = "32" ) ) )
497- ) ) ) ]
498- #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
499- pub fn blocks_free ( & self ) -> libc:: c_ulong {
500- self . 0 . f_bfree
501- }
502-
503- /// Free blocks available to unprivileged user
504- #[ cfg( any( target_os = "ios" , target_os = "macos" , target_os = "android" ) ) ]
482+ target_os = "fuchsia" ,
483+ target_os = "linux" ,
484+ ) ) ]
505485 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
506486 pub fn blocks_available ( & self ) -> u64 {
507487 self . 0 . f_bavail
@@ -522,24 +502,9 @@ impl Statfs {
522502 }
523503
524504 /// Free blocks available to unprivileged user
525- #[ cfg( all ( target_os = "linux" , any ( target_env = "musl" , target_arch = "riscv32" , all ( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ) ]
505+ #[ cfg( target_os = "emscripten" ) ]
526506 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
527- pub fn blocks_available ( & self ) -> u64 {
528- self . 0 . f_bavail
529- }
530-
531- /// Free blocks available to unprivileged user
532- #[ cfg( not( any(
533- target_os = "ios" ,
534- target_os = "macos" ,
535- target_os = "android" ,
536- target_os = "freebsd" ,
537- target_os = "openbsd" ,
538- target_os = "dragonfly" ,
539- all( target_os = "linux" , any( target_env = "musl" , target_arch = "riscv32" , all( target_arch = "x86_64" , target_pointer_width = "32" ) ) )
540- ) ) ) ]
541- #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
542- pub fn blocks_available ( & self ) -> libc:: c_ulong {
507+ pub fn blocks_available ( & self ) -> u32 {
543508 self . 0 . f_bavail
544509 }
545510
@@ -549,7 +514,9 @@ impl Statfs {
549514 target_os = "macos" ,
550515 target_os = "android" ,
551516 target_os = "freebsd" ,
517+ target_os = "fuchsia" ,
552518 target_os = "openbsd" ,
519+ target_os = "linux" ,
553520 ) ) ]
554521 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
555522 pub fn files ( & self ) -> u64 {
@@ -564,33 +531,20 @@ impl Statfs {
564531 }
565532
566533 /// Total file nodes in filesystem
567- #[ cfg( all ( target_os = "linux" , any ( target_env = "musl" , target_arch = "riscv32" , all ( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ) ]
534+ #[ cfg( target_os = "emscripten" ) ]
568535 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
569- pub fn files ( & self ) -> libc :: fsfilcnt_t {
536+ pub fn files ( & self ) -> u32 {
570537 self . 0 . f_files
571538 }
572539
573- /// Total file nodes in filesystem
574- #[ cfg( not ( any(
540+ /// Free file nodes in filesystem
541+ #[ cfg( any(
575542 target_os = "ios" ,
576543 target_os = "macos" ,
577544 target_os = "android" ,
578- target_os = "freebsd " ,
545+ target_os = "fuchsia " ,
579546 target_os = "openbsd" ,
580- target_os = "dragonfly" ,
581- all( target_os = "linux" , any( target_env = "musl" , target_arch = "riscv32" , all( target_arch = "x86_64" , target_pointer_width = "32" ) ) )
582- ) ) ) ]
583- #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
584- pub fn files ( & self ) -> libc:: c_ulong {
585- self . 0 . f_files
586- }
587-
588- /// Free file nodes in filesystem
589- #[ cfg( any(
590- target_os = "android" ,
591- target_os = "ios" ,
592- target_os = "macos" ,
593- target_os = "openbsd"
547+ target_os = "linux" ,
594548 ) ) ]
595549 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
596550 pub fn files_free ( & self ) -> u64 {
@@ -612,24 +566,9 @@ impl Statfs {
612566 }
613567
614568 /// Free file nodes in filesystem
615- #[ cfg( all( target_os = "linux" , any( target_env = "musl" , target_arch = "riscv32" , all( target_arch = "x86_64" , target_pointer_width = "32" ) ) ) ) ]
616- #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
617- pub fn files_free ( & self ) -> libc:: fsfilcnt_t {
618- self . 0 . f_ffree
619- }
620-
621- /// Free file nodes in filesystem
622- #[ cfg( not( any(
623- target_os = "ios" ,
624- target_os = "macos" ,
625- target_os = "android" ,
626- target_os = "freebsd" ,
627- target_os = "openbsd" ,
628- target_os = "dragonfly" ,
629- all( target_os = "linux" , any( target_env = "musl" , target_arch = "riscv32" , all( target_arch = "x86_64" , target_pointer_width = "32" ) ) )
630- ) ) ) ]
569+ #[ cfg( target_os = "emscripten" ) ]
631570 #[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
632- pub fn files_free ( & self ) -> libc :: c_ulong {
571+ pub fn files_free ( & self ) -> u32 {
633572 self . 0 . f_ffree
634573 }
635574
0 commit comments