gvfs/gdu-0006-Ignore-drives-if-all-volumes-of-the-drive-are-ignore.patch
David Zeuthen 5455e5f26a - Clean up gdu patches and bump BR for gdu to 0.3
- Avoiding showing volume for ignored mounts (#495033)
2009-04-10 01:24:24 +00:00

42 lines
1.3 KiB
Diff

From 346fdc3ddf383228ed58a48252e70919f6636b6e Mon Sep 17 00:00:00 2001
From: David Zeuthen <davidz@redhat.com>
Date: Thu, 9 Apr 2009 19:39:55 -0400
Subject: [PATCH 6/7] Ignore drives if all volumes of the drive are ignored
---
monitor/gdu/ggduvolumemonitor.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
index 93aaf03..9ecee8b 100644
--- a/monitor/gdu/ggduvolumemonitor.c
+++ b/monitor/gdu/ggduvolumemonitor.c
@@ -763,15 +763,17 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
device = gdu_presentable_get_device (GDU_PRESENTABLE (d));
- /* the GduDevice for an activatable drive (such as RAID) is NULL if the drive is not
- * activated; never ignore these
+ /* If there is no GduDevice for a drive, then ignore it.
+ *
+ * Note that right now the only drives without a GduDevice are Linux
+ * MD arrays not yet activated. In the future we might want to
+ * display these so the user can start the array.
*/
if (device == NULL)
- goto out;
-
- /* never ignore drives with removable media */
- if (gdu_device_is_removable (device))
- goto out;
+ {
+ ret = TRUE;
+ goto out;
+ }
has_volumes = FALSE;
all_volumes_are_ignored = TRUE;
--
1.6.2.2