Commit 820e2d3d authored by David Zeuthen's avatar David Zeuthen

Remove MD-RAID support

Signed-off-by: 's avatarDavid Zeuthen <zeuthen@gmail.com>
parent dd6c6bd4
......@@ -24,8 +24,6 @@ ui_DATA = \
app-menu.ui \
benchmark-dialog.ui \
disk-settings-dialog.ui \
md-raid-disks-dialog.ui \
create-raid-array-dialog.ui \
erase-multiple-disks-dialog.ui \
$(NULL)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -12,7 +12,6 @@ data/org.gnome.settings-daemon.plugins.gdu-sd.gschema.xml.in.in
[type: gettext/glade]data/ui/change-passphrase-dialog.ui
[type: gettext/glade]data/ui/create-disk-image-dialog.ui
[type: gettext/glade]data/ui/create-partition-dialog.ui
[type: gettext/glade]data/ui/create-raid-array-dialog.ui
[type: gettext/glade]data/ui/disk-settings-dialog.ui
[type: gettext/glade]data/ui/disks.ui
[type: gettext/glade]data/ui/edit-crypttab-dialog.ui
......@@ -25,7 +24,6 @@ data/org.gnome.settings-daemon.plugins.gdu-sd.gschema.xml.in.in
[type: gettext/glade]data/ui/filesystem-create.ui
[type: gettext/glade]data/ui/format-disk-dialog.ui
[type: gettext/glade]data/ui/format-volume-dialog.ui
[type: gettext/glade]data/ui/md-raid-disks-dialog.ui
[type: gettext/glade]data/ui/restore-disk-image-dialog.ui
[type: gettext/glade]data/ui/smart-dialog.ui
[type: gettext/glade]data/ui/unlock-device-dialog.ui
......@@ -37,7 +35,6 @@ src/disks/gduchangepassphrasedialog.c
src/disks/gducreatediskimagedialog.c
src/disks/gducreatefilesystemwidget.c
src/disks/gducreatepartitiondialog.c
src/disks/gducreateraidarraydialog.c
src/disks/gducrypttabdialog.c
src/disks/gdudevicetreemodel.c
src/disks/gdudisksettingsdialog.c
......@@ -47,7 +44,6 @@ src/disks/gdufilesystemdialog.c
src/disks/gduformatdiskdialog.c
src/disks/gduformatvolumedialog.c
src/disks/gdufstabdialog.c
src/disks/gdumdraiddisksdialog.c
src/disks/gdupartitiondialog.c
src/disks/gdupasswordstrengthwidget.c
src/disks/gdurestorediskimagedialog.c
......
......@@ -47,8 +47,6 @@ gnome_disks_SOURCES = \
gduestimator.h gduestimator.c \
gduchangepassphrasedialog.h gduchangepassphrasedialog.c \
gdudisksettingsdialog.h gdudisksettingsdialog.c \
gdumdraiddisksdialog.h gdumdraiddisksdialog.c \
gducreateraidarraydialog.h gducreateraidarraydialog.c \
gduerasemultipledisksdialog.h gduerasemultipledisksdialog.c \
gdudvdsupport.h gdudvdsupport.c \
gdulocaljob.h gdulocaljob.c \
......
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2008-2013 Red Hat, Inc.
*
* Licensed under GPL version 2 or later.
*
* Author: David Zeuthen <zeuthen@gmail.com>
*/
#ifndef __GDU_CREATE_RAID_ARRAY_DIALOG_H__
#define __GDU_CREATE_RAID_ARRAY_DIALOG_H__
#include <gtk/gtk.h>
#include "gdutypes.h"
G_BEGIN_DECLS
gboolean gdu_create_raid_array_dialog_show (GduWindow *window,
GList *objects);
G_END_DECLS
#endif /* __GDU_CREATE_RAID_ARRAY_DIALOG_H__ */
This diff is collapsed.
This diff is collapsed.
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2008-2013 Red Hat, Inc.
*
* Licensed under GPL version 2 or later.
*
* Author: David Zeuthen <zeuthen@gmail.com>
*/
#ifndef __GDU_MDRAID_DISKS_DIALOG_H__
#define __GDU_MDRAID_DISKS_DIALOG_H__
#include <gtk/gtk.h>
#include "gdutypes.h"
G_BEGIN_DECLS
void gdu_mdraid_disks_dialog_show (GduWindow *window,
UDisksObject *object);
G_END_DECLS
#endif /* __GDU_MDRAID_DISKS_DIALOG_H__ */
......@@ -1700,39 +1700,6 @@ grid_element_set_details (GduVolumeGrid *grid,
element->show_mounted = TRUE;
}
}
else if (g_strcmp0 (usage, "raid") == 0 && strlen (label) > 0)
{
type_for_display = udisks_client_get_id_for_display (grid->client, usage, type, version, FALSE);
if (g_strcmp0 (type, "linux_raid_member") == 0)
{
const gchar *sep = strstr (label, ":");
if (sep != NULL && strlen (sep) > 1)
{
gchar *homehost = g_strndup (label, sep - label);
g_ptr_array_add (lines,
/* Translators: Shown in volume grid for Linux RAID members. Please
* keep this as short as possible.
* The first %s is the array name (e.g. 'MirrorOnTheWall').
* The second %s is the homehost (e.g. 'thinkpad').
*/
g_strdup_printf (C_("volume-grid", "%s [local to %s]"),
sep + 1,
homehost));
g_free (homehost);
}
else
{
g_ptr_array_add (lines, g_strdup (label));
}
}
else
{
g_ptr_array_add (lines, g_strdup (label));
}
maybe_add_partition (grid, lines, partition);
g_ptr_array_add (lines, g_strdup_printf ("%s %s", size_str, type_for_display));
g_free (type_for_display);
}
else
{
maybe_add_partition (grid, lines, partition);
......
This diff is collapsed.
......@@ -780,78 +780,6 @@ gdu_utils_is_ntfs_available (void)
/* ---------------------------------------------------------------------------------------------------- */
gchar *
gdu_utils_format_mdraid_level (const gchar *level,
gboolean long_desc,
gboolean use_markup)
{
gchar *ret = NULL;
const gchar *markup_format;
if (long_desc)
{
if (use_markup)
markup_format = "%s <span size=\"small\">(%s)</span>";
else
markup_format = "%s (%s)";
}
else
{
markup_format = "%s";
}
/* we know better than the compiler here */
#ifdef __GNUC_PREREQ
# if __GNUC_PREREQ(4,6)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wformat-nonliteral"
# endif
#endif
if (g_strcmp0 (level, "raid0") == 0)
{
ret = g_strdup_printf (markup_format,
_("RAID 0"),
_("Stripe"));
}
else if (g_strcmp0 (level, "raid1") == 0)
{
ret = g_strdup_printf (markup_format,
_("RAID 1"),
_("Mirror"));
}
else if (g_strcmp0 (level, "raid4") == 0)
{
ret = g_strdup_printf (markup_format,
_("RAID 4"),
_("Dedicated Parity"));
}
else if (g_strcmp0 (level, "raid5") == 0)
{
ret = g_strdup_printf (markup_format,
_("RAID 5"),
_("Distributed Parity"));
}
else if (g_strcmp0 (level, "raid6") == 0)
{
ret = g_strdup_printf (markup_format,
_("RAID 6"),
_("Double Distributed Parity"));
}
else if (g_strcmp0 (level, "raid10") == 0)
{
ret = g_strdup_printf (markup_format,
_("RAID 10"),
_("Stripe of Mirrors"));
}
if (ret == NULL)
{
ret = g_strdup_printf (_("RAID (%s)"), level);
}
return ret;
}
#ifdef __GNUC_PREREQ
# if __GNUC_PREREQ(4,6)
# pragma GCC diagnostic pop
......
......@@ -62,10 +62,6 @@ gboolean gdu_utils_show_confirmation (GtkWindow *parent_window,
gboolean gdu_utils_is_ntfs_available (void);
gchar *gdu_utils_format_mdraid_level (const gchar *level,
gboolean long_desc,
gboolean use_markup);
gboolean gdu_util_is_same_size (GList *blocks,
guint64 *out_min_size);
......
......@@ -33,10 +33,6 @@ struct GduSdMonitor {
/* ATA SMART problems */
GList *ata_smart_problems;
NotifyNotification *ata_smart_notification;
/* MD-RAID problems */
GList *mdraid_problems;
NotifyNotification *mdraid_notification;
};
G_DEFINE_TYPE (GduSdMonitor, gdu_sd_monitor, G_TYPE_OBJECT);
......@@ -94,9 +90,6 @@ gdu_sd_monitor_finalize (GObject *object)
g_list_free_full (monitor->ata_smart_problems, g_object_unref);
g_clear_object (&monitor->ata_smart_notification);
g_list_free_full (monitor->mdraid_problems, g_object_unref);
g_clear_object (&monitor->mdraid_notification);
G_OBJECT_CLASS (gdu_sd_monitor_parent_class)->finalize (object);
}
......@@ -257,26 +250,6 @@ on_examine_action_clicked (NotifyNotification *notification,
}
}
}
else if (g_strcmp0 (action, "examine-mdraid") == 0)
{
if (monitor->mdraid_problems != NULL)
{
UDisksObject *object = UDISKS_OBJECT (monitor->mdraid_problems->data);
if (object != NULL)
{
UDisksMDRaid *mdraid = udisks_object_peek_mdraid (object);
if (mdraid != NULL)
{
UDisksBlock *block = udisks_client_get_block_for_mdraid (monitor->client, mdraid);
if (block != NULL)
{
device_file = udisks_block_get_device (block);
g_object_ref (block);
}
}
}
}
}
else
{
g_assert_not_reached ();
......@@ -372,26 +345,6 @@ check_for_ata_smart_problem (GduSdMonitor *monitor,
return ret;
}
static gboolean
check_for_mdraid_problem (GduSdMonitor *monitor,
UDisksObject *object)
{
gboolean ret = FALSE;
UDisksMDRaid *mdraid = NULL;
mdraid = udisks_object_peek_mdraid (object);
if (mdraid == NULL)
goto out;
if (udisks_mdraid_get_degraded (mdraid) == 0)
goto out;
ret = TRUE;
out:
return ret;
}
static void
update (GduSdMonitor *monitor)
{
......@@ -407,19 +360,6 @@ update (GduSdMonitor *monitor)
"examine-smart",
/* Translators: Text for button in SMART failure notification */
C_("notify-smart", "Examine"));
update_problems (monitor, &monitor->mdraid_problems, check_for_mdraid_problem);
update_notification (monitor,
monitor->mdraid_problems,
&monitor->mdraid_notification,
/* Translators: This is used as the title of the MD-RAID degraded notification */
C_("notify-mdraid", "RAID Problems Detected"),
/* Translators: This is used as the text of the MD-RAID degraded notification */
C_("notify-mdraid", "A RAID array is degraded."),
"gnome-disks",
"examine-mdraid",
/* Translators: Text for button in MD-RAID degraded notification */
C_("notify-mdraid", "Examine"));
}
/* ---------------------------------------------------------------------------------------------------- */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment