[gnome-disk-utility/wip/mdraid] Show 'Running' for arrays with no redundancy when they're actually running



commit ebb131623d50b24f787246e3beb950ea7ac47d18
Author: David Zeuthen <zeuthen gmail com>
Date:   Thu Sep 20 13:11:45 2012 -0400

    Show 'Running' for arrays with no redundancy when they're actually running
    
    The SyncAction property is empty for such arrays and we didn't handle
    that correctly.
    
    Signed-off-by: David Zeuthen <zeuthen gmail com>

 src/disks/gduwindow.c |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)
---
diff --git a/src/disks/gduwindow.c b/src/disks/gduwindow.c
index 7e0d7d5..2a61bde 100644
--- a/src/disks/gduwindow.c
+++ b/src/disks/gduwindow.c
@@ -2094,20 +2094,28 @@ update_device_page_for_mdraid (GduWindow      *window,
 
   if (sync_action == NULL || strlen (sync_action) == 0)
     {
-      if (udisks_mdraid_get_can_start (mdraid))
-        {
-          /* Translators: Shown in the 'State' field for MD-RAID when not running and can be started */
-          raid_state_upper = g_strdup (C_("mdraid-state", "Not running"));
-        }
-      else if (udisks_mdraid_get_can_start_degraded (mdraid))
+      /* could be we're already running but don't have any redundancy built-in */
+      if (block != NULL)
         {
-          /* Translators: Shown in the 'State' field for MD-RAID when not running and can only be started degraded */
-          raid_state_upper = g_strdup (C_("mdraid-state", "Not running â Can only start degraded"));
+          raid_state_upper = g_strdup (C_("mdraid-state", "Running"));
         }
       else
         {
-          /* Translators: Shown in the 'State' field for MD-RAID when not running */
-          raid_state_upper = g_strdup (C_("mdraid-state", "Not running â Not enough disks to start"));
+          if (udisks_mdraid_get_can_start (mdraid))
+            {
+              /* Translators: Shown in the 'State' field for MD-RAID when not running and can be started */
+              raid_state_upper = g_strdup (C_("mdraid-state", "Not running"));
+            }
+          else if (udisks_mdraid_get_can_start_degraded (mdraid))
+            {
+              /* Translators: Shown in the 'State' field for MD-RAID when not running and can only be started degraded */
+              raid_state_upper = g_strdup (C_("mdraid-state", "Not running â Can only start degraded"));
+            }
+          else
+            {
+              /* Translators: Shown in the 'State' field for MD-RAID when not running */
+              raid_state_upper = g_strdup (C_("mdraid-state", "Not running â Not enough disks to start"));
+            }
         }
     }
   else



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]