5455e5f26a
- Avoiding showing volume for ignored mounts (#495033)
70 lines
2.8 KiB
Diff
70 lines
2.8 KiB
Diff
From 94707c12442ed9ce099f110ec7089309133727ae Mon Sep 17 00:00:00 2001
|
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
Date: Thu, 9 Apr 2009 19:03:16 -0400
|
|
Subject: [PATCH 2/7] Fix how we determine if a volume is ignored
|
|
|
|
This fixes a typo - wrong assignment of device file when testing whether the
|
|
volume should be ignored or not. It led to empty GVolume list associated to a
|
|
GDrive and thus inability to mount anything via computer://
|
|
|
|
Signed-off-by: David Zeuthen <davidz@redhat.com>
|
|
---
|
|
monitor/gdu/ggduvolumemonitor.c | 18 +++++++++---------
|
|
1 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
|
|
index 32604d0..b52ee11 100644
|
|
--- a/monitor/gdu/ggduvolumemonitor.c
|
|
+++ b/monitor/gdu/ggduvolumemonitor.c
|
|
@@ -617,7 +617,7 @@ get_mount_point_for_device (GduDevice *d, GList *fstab_mount_points)
|
|
for (l = fstab_mount_points; l != NULL; l = l->next)
|
|
{
|
|
GUnixMountPoint *mount_point = l->data;
|
|
- const gchar *device_file;
|
|
+ const gchar *fstab_device_file;
|
|
const gchar *fstab_mount_path;
|
|
|
|
fstab_mount_path = g_unix_mount_point_get_mount_path (mount_point);
|
|
@@ -627,18 +627,18 @@ get_mount_point_for_device (GduDevice *d, GList *fstab_mount_points)
|
|
goto out;
|
|
}
|
|
|
|
- device_file = g_unix_mount_point_get_device_path (mount_point);
|
|
- if (g_str_has_prefix (device_file, "LABEL="))
|
|
+ fstab_device_file = g_unix_mount_point_get_device_path (mount_point);
|
|
+ if (g_str_has_prefix (fstab_device_file, "LABEL="))
|
|
{
|
|
- if (g_strcmp0 (device_file + 6, gdu_device_id_get_label (d)) == 0)
|
|
+ if (g_strcmp0 (fstab_device_file + 6, gdu_device_id_get_label (d)) == 0)
|
|
{
|
|
ret = mount_point;
|
|
goto out;
|
|
}
|
|
}
|
|
- else if (g_str_has_prefix (device_file, "UUID="))
|
|
+ else if (g_str_has_prefix (fstab_device_file, "UUID="))
|
|
{
|
|
- if (g_ascii_strcasecmp (device_file + 5, gdu_device_id_get_uuid (d)) == 0)
|
|
+ if (g_ascii_strcasecmp (fstab_device_file + 5, gdu_device_id_get_uuid (d)) == 0)
|
|
{
|
|
ret = mount_point;
|
|
goto out;
|
|
@@ -646,11 +646,11 @@ get_mount_point_for_device (GduDevice *d, GList *fstab_mount_points)
|
|
}
|
|
else
|
|
{
|
|
- char resolved_device_file[PATH_MAX];
|
|
+ char resolved_fstab_device_file[PATH_MAX];
|
|
|
|
/* handle symlinks such as /dev/disk/by-uuid/47C2-1994 */
|
|
- if (realpath (device_file, resolved_device_file) != NULL &&
|
|
- g_strcmp0 (resolved_device_file, device_file) == 0)
|
|
+ if (realpath (fstab_device_file, resolved_fstab_device_file) != NULL &&
|
|
+ g_strcmp0 (resolved_fstab_device_file, device_file) == 0)
|
|
{
|
|
ret = mount_point;
|
|
goto out;
|
|
--
|
|
1.6.2.2
|
|
|