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