Blame gdu-0006-Ignore-drives-if-all-volumes-of-the-drive-are-ignore.patch

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