|
David Zeuthen |
f59916c |
From 9a265228542de72df41caef8bd31402841ac389c Mon Sep 17 00:00:00 2001
|
|
David Zeuthen |
f59916c |
From: David Zeuthen <davidz@redhat.com>
|
|
David Zeuthen |
f59916c |
Date: Sat, 11 Apr 2009 12:43:06 -0400
|
|
David Zeuthen |
f59916c |
Subject: [PATCH] ignore drives without volumes
|
|
David Zeuthen |
f59916c |
|
|
David Zeuthen |
f59916c |
This fixes a problem on some dmraid setups where we have drives
|
|
David Zeuthen |
f59916c |
without any partitions (the dmraid boot scripts removes all partitions
|
|
David Zeuthen |
f59916c |
(!)). See https://bugzilla.redhat.com/show_bug.cgi?id=495152 for more
|
|
David Zeuthen |
f59916c |
details.
|
|
David Zeuthen |
f59916c |
|
|
David Zeuthen |
f59916c |
This fix is also consistent with the policy of ignoring drives where
|
|
David Zeuthen |
f59916c |
all volumes are ignored. E.g. prior to this patch we didn't shown
|
|
David Zeuthen |
f59916c |
neither sdb if sdb1 was a the only unrecognized partition on sdb.. so
|
|
David Zeuthen |
f59916c |
if you delete sdb1, it would be natural to keep hiding sdb (which is
|
|
David Zeuthen |
f59916c |
what this patch does).
|
|
David Zeuthen |
f59916c |
---
|
|
David Zeuthen |
f59916c |
monitor/gdu/ggduvolumemonitor.c | 8 +++++++-
|
|
David Zeuthen |
f59916c |
1 files changed, 7 insertions(+), 1 deletions(-)
|
|
David Zeuthen |
f59916c |
|
|
David Zeuthen |
f59916c |
diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
|
|
David Zeuthen |
f59916c |
index 9ecee8b..0e7ce6f 100644
|
|
David Zeuthen |
f59916c |
--- a/monitor/gdu/ggduvolumemonitor.c
|
|
David Zeuthen |
f59916c |
+++ b/monitor/gdu/ggduvolumemonitor.c
|
|
David Zeuthen |
f59916c |
@@ -799,7 +799,13 @@ should_drive_be_ignored (GduPool *pool, GduDrive *d, GList *fstab_mount_points)
|
|
David Zeuthen |
f59916c |
}
|
|
David Zeuthen |
f59916c |
}
|
|
David Zeuthen |
f59916c |
|
|
David Zeuthen |
f59916c |
- ret = has_volumes && all_volumes_are_ignored;
|
|
David Zeuthen |
f59916c |
+ /* we ignore a drive if
|
|
David Zeuthen |
f59916c |
+ *
|
|
David Zeuthen |
f59916c |
+ * a) it doesn't have any volumes; or
|
|
David Zeuthen |
f59916c |
+ *
|
|
David Zeuthen |
f59916c |
+ * b) the volumes of the drive are all ignored
|
|
David Zeuthen |
f59916c |
+ */
|
|
David Zeuthen |
f59916c |
+ ret = (!has_volumes) || (has_volumes && all_volumes_are_ignored);
|
|
David Zeuthen |
f59916c |
|
|
David Zeuthen |
f59916c |
out:
|
|
David Zeuthen |
f59916c |
g_list_foreach (enclosed, (GFunc) g_object_unref, NULL);
|
|
David Zeuthen |
f59916c |
--
|
|
David Zeuthen |
f59916c |
1.6.2.2
|
|
David Zeuthen |
f59916c |
|