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:
Simon Levermann 2019-10-23 09:06:03 +02:00 committed by Patrick
parent 308838da32
commit ad5be08a07

View File

@ -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;