[gvfs] udisks2: Filter out system mounts



commit 078588c4698742eb8c3308275f5bc457f72b2302
Author: Ondrej Holy <oholy redhat com>
Date:   Mon Sep 26 15:13:20 2016 +0200

    udisks2: Filter out system mounts
    
    System mounts (i.e. autofs) can be considered as user interesting
    currently if mount paths are user interesting. However, we should
    not handle those mounts as GMounts, because consequently redundant
    mounts are offered by volume monitor. It also causes automounts of
    autofs filesystems.
    
    $ mount | grep /media/test
    systemd-1 on /media/test type autofs ...
    localhost:/home/oholy on /media/test type nfs4 ...
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771740

 monitor/udisks2/gvfsudisks2volumemonitor.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.c b/monitor/udisks2/gvfsudisks2volumemonitor.c
index af1d51a..d7cf712 100644
--- a/monitor/udisks2/gvfsudisks2volumemonitor.c
+++ b/monitor/udisks2/gvfsudisks2volumemonitor.c
@@ -702,6 +702,9 @@ should_include_mount (GVfsUDisks2VolumeMonitor  *monitor,
   GUnixMountPoint *mount_point;
   gboolean ret;
 
+  if (g_unix_mount_is_system_internal (mount_entry))
+    return FALSE;
+
   /* if mounted at the designated mount point, use that info to decide */
   mount_point = get_mount_point_for_mount (mount_entry);
   if (mount_point != NULL)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]