def get_file_systems(gate): if not gate.grants('file_systems'): return [] if fs_t_filter: file_systems = [fs for fs in get_fslist() if fs.fs_type in fs_types] else: file_systems = get_fslist() file_systems = [fs for fs in file_systems if fs.mnt_dev.startswith('/dev/')] if fs_m_filter: for fs in file_systems: if not fs.mnt_pnt in fs_mounts: fs.mnt_pnt = WITHHELD_MAGIC_STRING else: for fs in file_systems: fs.mnt_pnt = WITHHELD_MAGIC_STRING return file_systems