[gvfs/gnome-3-22] udisks2: Use device path to match mount points also
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/gnome-3-22] udisks2: Use device path to match mount points also
- Date: Mon, 10 Oct 2016 14:09:06 +0000 (UTC)
commit 4d2562b33c07de1b817da8ba44afe07cac5e66c8
Author: Ondrej Holy <oholy redhat com>
Date: Mon Sep 26 15:12:47 2016 +0200
udisks2: Use device path to match mount points also
Mount path is used to match mount points currently, however device
path should be used also in order to be sure it is really corresponding
mount point. Same mount path can be used for multiple mount entries
(it is also used e.g. for autofs).
$ 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 | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.c b/monitor/udisks2/gvfsudisks2volumemonitor.c
index eee938c..af1d51a 100644
--- a/monitor/udisks2/gvfsudisks2volumemonitor.c
+++ b/monitor/udisks2/gvfsudisks2volumemonitor.c
@@ -583,7 +583,9 @@ get_mount_point_for_mount (GUnixMountEntry *mount_entry)
{
GUnixMountPoint *mount_point = l->data;
if (g_strcmp0 (g_unix_mount_get_mount_path (mount_entry),
- g_unix_mount_point_get_mount_path (mount_point)) == 0)
+ g_unix_mount_point_get_mount_path (mount_point)) == 0 &&
+ g_strcmp0 (g_unix_mount_get_device_path (mount_entry),
+ g_unix_mount_point_get_device_path (mount_point)) == 0)
{
ret = mount_point;
goto out;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]