@@ -422,7 +422,9 @@ impl Statfs {
422
422
target_os = "macos" ,
423
423
target_os = "android" ,
424
424
target_os = "freebsd" ,
425
+ target_os = "fuchsia" ,
425
426
target_os = "openbsd" ,
427
+ target_os = "linux" ,
426
428
) ) ]
427
429
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
428
430
pub fn blocks ( & self ) -> u64 {
@@ -437,24 +439,9 @@ impl Statfs {
437
439
}
438
440
439
441
/// 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" ) ]
441
443
#[ 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 {
458
445
self . 0 . f_blocks
459
446
}
460
447
@@ -464,7 +451,9 @@ impl Statfs {
464
451
target_os = "macos" ,
465
452
target_os = "android" ,
466
453
target_os = "freebsd" ,
454
+ target_os = "fuchsia" ,
467
455
target_os = "openbsd" ,
456
+ target_os = "linux" ,
468
457
) ) ]
469
458
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
470
459
pub fn blocks_free ( & self ) -> u64 {
@@ -479,29 +468,20 @@ impl Statfs {
479
468
}
480
469
481
470
/// 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" ) ]
483
472
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
484
- pub fn blocks_free ( & self ) -> u64 {
473
+ pub fn blocks_free ( & self ) -> u32 {
485
474
self . 0 . f_bfree
486
475
}
487
476
488
- /// Free blocks in filesystem
489
- #[ cfg( not ( any(
477
+ /// Free blocks available to unprivileged user
478
+ #[ cfg( any(
490
479
target_os = "ios" ,
491
480
target_os = "macos" ,
492
481
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
+ ) ) ]
505
485
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
506
486
pub fn blocks_available ( & self ) -> u64 {
507
487
self . 0 . f_bavail
@@ -522,24 +502,9 @@ impl Statfs {
522
502
}
523
503
524
504
/// 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" ) ]
526
506
#[ 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 {
543
508
self . 0 . f_bavail
544
509
}
545
510
@@ -549,7 +514,9 @@ impl Statfs {
549
514
target_os = "macos" ,
550
515
target_os = "android" ,
551
516
target_os = "freebsd" ,
517
+ target_os = "fuchsia" ,
552
518
target_os = "openbsd" ,
519
+ target_os = "linux" ,
553
520
) ) ]
554
521
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
555
522
pub fn files ( & self ) -> u64 {
@@ -564,33 +531,20 @@ impl Statfs {
564
531
}
565
532
566
533
/// 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" ) ]
568
535
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
569
- pub fn files ( & self ) -> libc :: fsfilcnt_t {
536
+ pub fn files ( & self ) -> u32 {
570
537
self . 0 . f_files
571
538
}
572
539
573
- /// Total file nodes in filesystem
574
- #[ cfg( not ( any(
540
+ /// Free file nodes in filesystem
541
+ #[ cfg( any(
575
542
target_os = "ios" ,
576
543
target_os = "macos" ,
577
544
target_os = "android" ,
578
- target_os = "freebsd " ,
545
+ target_os = "fuchsia " ,
579
546
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" ,
594
548
) ) ]
595
549
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
596
550
pub fn files_free ( & self ) -> u64 {
@@ -612,24 +566,9 @@ impl Statfs {
612
566
}
613
567
614
568
/// 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" ) ]
631
570
#[ cfg_attr( docsrs, doc( cfg( all( ) ) ) ) ]
632
- pub fn files_free ( & self ) -> libc :: c_ulong {
571
+ pub fn files_free ( & self ) -> u32 {
633
572
self . 0 . f_ffree
634
573
}
635
574
0 commit comments