gunixmounts: Stop considering cifs/nfs as system file systems

They’re network file systems, but not system file systems (in the sense
that procfs is a system file system). This fixes them disappearing from
the sidebar in the UI.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1424
This commit is contained in:
Philip Withnall 2018-06-20 12:16:34 +01:00
parent d4cb3dfcaf
commit a3a6c516c4
2 changed files with 6 additions and 4 deletions

View File

@ -307,7 +307,6 @@ g_unix_is_system_fs_type (const char *fs_type)
"autofs", "autofs",
"autofs4", "autofs4",
"cgroup", "cgroup",
"cifs",
"configfs", "configfs",
"cxfs", "cxfs",
"debugfs", "debugfs",
@ -329,8 +328,6 @@ g_unix_is_system_fs_type (const char *fs_type)
"mfs", "mfs",
"mqueue", "mqueue",
"ncpfs", "ncpfs",
"nfs",
"nfs4",
"nfsd", "nfsd",
"nullfs", "nullfs",
"ocfs2", "ocfs2",
@ -343,7 +340,6 @@ g_unix_is_system_fs_type (const char *fs_type)
"rpc_pipefs", "rpc_pipefs",
"securityfs", "securityfs",
"selinuxfs", "selinuxfs",
"smbfs",
"sysfs", "sysfs",
"tmpfs", "tmpfs",
"usbfs", "usbfs",

View File

@ -33,6 +33,12 @@ test_is_system_fs_type (void)
{ {
g_assert_true (g_unix_is_system_fs_type ("tmpfs")); g_assert_true (g_unix_is_system_fs_type ("tmpfs"));
g_assert_false (g_unix_is_system_fs_type ("ext4")); g_assert_false (g_unix_is_system_fs_type ("ext4"));
/* Check that some common network file systems arent considered system. */
g_assert_false (g_unix_is_system_fs_type ("cifs"));
g_assert_false (g_unix_is_system_fs_type ("nfs"));
g_assert_false (g_unix_is_system_fs_type ("nfs4"));
g_assert_false (g_unix_is_system_fs_type ("smbfs"));
} }
static void static void