rpms/gvfs/F-12 consider-logical-partitions.patch, NONE, 1.1 gvfs.spec, 1.158, 1.159
Matthias Clasen
mclasen at fedoraproject.org
Thu Oct 1 23:21:41 UTC 2009
- Previous message: rpms/libuser/devel .cvsignore, 1.52, 1.53 libuser.spec, 1.85, 1.86 sources, 1.54, 1.55
- Next message: rpms/libuser/F-12 .cvsignore, 1.52, 1.53 libuser.spec, 1.85, 1.86 sources, 1.54, 1.55
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mclasen
Update of /cvs/pkgs/rpms/gvfs/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3672
Modified Files:
gvfs.spec
Added Files:
consider-logical-partitions.patch
Log Message:
Consider logical partitions when deciding if to hide a drive
consider-logical-partitions.patch:
ggduvolumemonitor.c | 42 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
--- NEW FILE consider-logical-partitions.patch ---
>From dfa4b522b5c19c4723004baab3e54592f9875597 Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz at redhat.com>
Date: Thu, 1 Oct 2009 16:49:32 -0400
Subject: [PATCH] =?UTF-8?q?Bug=20597041=20=E2=80=93=20Manual=20umount=20triggers=20mount=20request?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We also need to consider logical partitions when determining if a
drive should be ignored.
---
monitor/gdu/ggduvolumemonitor.c | 41 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
index ac90ba4..83d8fc2 100644
--- a/monitor/gdu/ggduvolumemonitor.c
+++ b/monitor/gdu/ggduvolumemonitor.c
@@ -871,7 +871,7 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
/* never ignore a drive if it has volumes that we don't want to ignore */
enclosed = gdu_pool_get_enclosed_presentables (pool, GDU_PRESENTABLE (d));
- for (l = enclosed; l != NULL; l = l->next)
+ for (l = enclosed; l != NULL && all_volumes_are_ignored; l = l->next)
{
GduPresentable *enclosed_presentable = GDU_PRESENTABLE (l->data);
@@ -879,6 +879,7 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
if (GDU_IS_VOLUME (enclosed_presentable))
{
GduVolume *volume = GDU_VOLUME (enclosed_presentable);
+ GduDevice *volume_device;
have_volumes = TRUE;
@@ -887,6 +888,44 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
all_volumes_are_ignored = FALSE;
break;
}
+
+ /* The volume may be an extended partition - we need to check all logical
+ * partitions as well (#597041)
+ */
+ volume_device = gdu_presentable_get_device (GDU_PRESENTABLE (volume));
+ if (volume_device != NULL)
+ {
+ if (g_strcmp0 (gdu_device_partition_get_scheme (volume_device), "mbr") == 0)
+ {
+ gint type;
+
+ type = strtol (gdu_device_partition_get_type (volume_device), NULL, 0);
+ if (type == 0x05 || type == 0x0f || type == 0x85)
+ {
+ GList *enclosed_logical;
+ GList *ll;
+
+ enclosed_logical = gdu_pool_get_enclosed_presentables (pool, GDU_PRESENTABLE (volume));
+ for (ll = enclosed_logical; ll != NULL && all_volumes_are_ignored; ll = ll->next)
+ {
+ GduPresentable *enclosed_logical_presentable = GDU_PRESENTABLE (ll->data);
+
+ if (GDU_IS_VOLUME (enclosed_logical_presentable))
+ {
+ if (!should_volume_be_ignored (pool,
+ GDU_VOLUME (enclosed_logical_presentable),
+ fstab_mount_points))
+ {
+ all_volumes_are_ignored = FALSE;
+ }
+ }
+ }
+ g_list_foreach (enclosed_logical, (GFunc) g_object_unref, NULL);
+ g_list_free (enclosed_logical);
+ }
+ }
+ g_object_unref (volume_device);
+ }
}
}
--
1.6.4.4
Index: gvfs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gvfs/F-12/gvfs.spec,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -p -r1.158 -r1.159
--- gvfs.spec 29 Sep 2009 20:14:51 -0000 1.158
+++ gvfs.spec 1 Oct 2009 23:21:39 -0000 1.159
@@ -1,7 +1,7 @@
Summary: Backends for the gio framework in GLib
Name: gvfs
Version: 1.4.0
-Release: 2%{?dist}
+Release: 3%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://www.gtk.org
@@ -39,6 +39,8 @@ Patch0: gvfs-archive-integration.patch
Patch1: 0001-Add-AFC-backend.patch
# from upstream
Patch2: http-icons.patch
+# from upstream
+Patch3: consider-logical-partitions.patch
%description
The gvfs package provides backend implementations for the gio
@@ -286,6 +288,9 @@ update-desktop-database &> /dev/null ||:
%{_datadir}/gvfs/remote-volume-monitors/afc.monitor
%changelog
+* Thu Oct 1 2009 Matthias Clasen <mclasen at redhat.com> - 1.4.0-3
+- Consider logical partitions when deciding if a drive should be ignored
+
* Tue Sep 29 2009 Matthias Clasen <mclasen at redhat.com> - 1.4.0-2
- Fix the lack of icons in the http backend
- Previous message: rpms/libuser/devel .cvsignore, 1.52, 1.53 libuser.spec, 1.85, 1.86 sources, 1.54, 1.55
- Next message: rpms/libuser/F-12 .cvsignore, 1.52, 1.53 libuser.spec, 1.85, 1.86 sources, 1.54, 1.55
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list