Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-only and -json don't work together, -only fuse doesn't work at all #284

Open
quantenzitrone opened this issue Sep 1, 2024 · 1 comment

Comments

@quantenzitrone
Copy link

quantenzitrone commented Sep 1, 2024

To Reproduce

json not filtering:

  1. run duf -only local -json or duf -only special -json
  2. observe all devices being printed in the json (for me that is special, local and fuse)

only fuse not working:

  1. run duf -all
  2. see some (for me one) fuse file systems
  3. run duf -only fuse
  4. observe nothing being printed

System Information

$ duf --version
duf 0.8.1
$ uname -a
Linux venquore 6.10.3 #1-NixOS SMP PREEMPT_DYNAMIC Sat Aug  3 07:01:09 UTC 2024 x86_64 GNU/Linux
$ nixos-version
24.11.20240811.a58bc8a (Vicuna)
@RangerCD
Copy link
Contributor

RangerCD commented Nov 7, 2024

duf/main.go

Line 50 in ae480f3

jsonOutput = flag.Bool("json", false, "output all devices in JSON format")

--json is supposed to print all devices

duf/groups.go

Lines 80 to 88 in ae480f3

// skip special devices
if v.Blocks == 0 && !*all {
continue
}
// skip zero size devices
if v.BlockSize == 0 && !*all {
continue
}

--only fuse shows only fuse devices, but each device also has to be a valid storage device

For example, I can see 4 fuse devices with --all, but only the first one that is actually an object storage mounted with JuiceFS can be recognized.

--all
2024-11-07_14-38

--only fuse
2024-11-07_14-38_1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants