Ignore some non-interesting filesystem types
Generally, how much space we have in squashfs, or tmpfs shouldn't interest us. This becomes more relevant in distros like Ubuntu, where snaps are a thing, and each snap mounts their own FS in a squashfs that is always full, thus falsifying the output of sysinfo.
This commit is contained in:
parent
60c9263d49
commit
6a7a134170
@ -26,7 +26,7 @@ int xs_parse_df(gint64 *out_total, gint64 *out_free)
|
||||
FILE *pipe;
|
||||
char buffer[bsize];
|
||||
|
||||
pipe = popen("df -k -l -P", "r");
|
||||
pipe = popen("df -k -l -P --exclude-type=squashfs --exclude-type=devtmpfs --exclude-type=tmpfs", "r");
|
||||
if(pipe==NULL)
|
||||
return 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user