diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/analyze/analyze.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c index 4153afb1c6..3801cf0ead 100644 --- a/src/analyze/analyze.c +++ b/src/analyze/analyze.c @@ -1944,8 +1944,29 @@ static int dump_filesystems(int argc, char *argv[], void *userdata) { strv_sort(l); - STRV_FOREACH(filesystem, l) + STRV_FOREACH(filesystem, l) { + const statfs_f_type_t *magic; + bool is_primary = false; + + assert(fs_type_from_string(*filesystem, &magic) >= 0); + + for (size_t i = 0; magic[i] != 0; i++) { + const char *primary; + + primary = fs_type_to_string(magic[i]); + assert(primary); + + if (streq(primary, *filesystem)) + is_primary = true; + } + + if (!is_primary) { + log_debug("Skipping ungrouped file system '%s', because it's an alias for another one.", *filesystem); + continue; + } + printf("# %s\n", *filesystem); + } } if (k < 0) { |