mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
gunixmounts: Prevent unwanted automount requests
mnt_table_is_fs_mounted causes unwanted automount requests due to canonicalization of source and target. It might be replaced by mnt_table_find_source as per the documentation in order to prevent the automounts, but it is redundant. All mtab entries should be already mounted and thus mnt_table_is_fs_mounted result is always true (it basically checks that the fs from mtab is in mtab). Let's remove the check at all. https://bugzilla.gnome.org/show_bug.cgi?id=781867
This commit is contained in:
parent
53ed1804e2
commit
83c1b881fb
@ -408,9 +408,6 @@ _g_get_unix_mounts (void)
|
|||||||
unsigned long mount_flags = 0;
|
unsigned long mount_flags = 0;
|
||||||
gboolean is_read_only = FALSE;
|
gboolean is_read_only = FALSE;
|
||||||
|
|
||||||
if (!mnt_table_is_fs_mounted (table, fs))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
device_path = mnt_fs_get_source (fs);
|
device_path = mnt_fs_get_source (fs);
|
||||||
if (g_strcmp0 (device_path, "/dev/root") == 0)
|
if (g_strcmp0 (device_path, "/dev/root") == 0)
|
||||||
device_path = _resolve_dev_root ();
|
device_path = _resolve_dev_root ();
|
||||||
|
Loading…
Reference in New Issue
Block a user