[gnome-disk-utility/wip/mdraid: 44/44] Make the "Go To Disk" button work on nested RAID arrays
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/wip/mdraid: 44/44] Make the "Go To Disk" button work on nested RAID arrays
- Date: Thu, 20 Sep 2012 19:20:05 +0000 (UTC)
commit 2327e8f17e25d41f3fa364e99fce802456c1ef66
Author: David Zeuthen <zeuthen gmail com>
Date: Thu Sep 20 15:19:20 2012 -0400
Make the "Go To Disk" button work on nested RAID arrays
Signed-off-by: David Zeuthen <zeuthen gmail com>
src/disks/gduwindow.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/disks/gduwindow.c b/src/disks/gduwindow.c
index 2a61bde..9e54756 100644
--- a/src/disks/gduwindow.c
+++ b/src/disks/gduwindow.c
@@ -558,6 +558,22 @@ set_selected_object (GduWindow *window,
}
else
{
+ UDisksBlock *block;
+
+ /* that didn't work, maybe it's a block device that is shown as another root object */
+ block = udisks_object_peek_block (object);
+ if (block != NULL)
+ {
+ UDisksObject *mdraid_object;
+ /* MD-RAID */
+ mdraid_object = udisks_client_peek_object (window->client, udisks_block_get_mdraid (block));
+ if (mdraid_object != NULL)
+ {
+ set_selected_object (window, mdraid_object);
+ goto out;
+ }
+ }
+
if (object != NULL)
g_warning ("Cannot display object with object path %s",
g_dbus_object_get_object_path (G_DBUS_OBJECT (object)));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]