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