[gparted] Remove SWRaid method as it is no longer needed (#678379)



commit de99c530d45877f7bce1b0c0f616c03e8c1ebb89
Author: Curtis Gedak <gedakc gmail com>
Date:   Wed Nov 14 13:05:50 2012 -0700

    Remove SWRaid method as it is no longer needed (#678379)
    
    Active Linux software RAID devices are detected in the
    Proc_Partitions_Info method.  Hence the SWRaid method is no longer
    required.
    
    Removal of the SWRaid method fixes the problem with the error message:
    
      Could not stat device /dev/md/0 - No such file or directory
    
    This fixes the problem because we no longer use "mdadm --examine
    --scan" in an attempt to detect Linux software RAID devices.  The
    mdadm command was returning device names such as /dev/md/0, which are
    incorrect for GParted.
    
    NOTE:  With this change, GParted no longer requires the mdadm command
           to detect Linux software RAID devices.
    
    Closes Bug #678379 - Could not stat device /dev/md/0 - No such file or
                         directory

 README              |    4 --
 include/Makefile.am |    1 -
 include/SWRaid.h    |   55 ---------------------------
 src/GParted_Core.cc |   12 ------
 src/Makefile.am     |    1 -
 src/SWRaid.cc       |  104 ---------------------------------------------------
 6 files changed, 0 insertions(+), 177 deletions(-)
---
diff --git a/README b/README
index aedb3fe..9ef58fb 100644
--- a/README
+++ b/README
@@ -149,10 +149,6 @@ Optional packages include:
             package before that.
 
 
-For Linux software RAID support, the following package is required:
-   mdadm           - tool to administer Linux MD arrays
-
-
 For dmraid support, the following packages are required:
 
    dmsetup         - removes /dev/mapper entries
diff --git a/include/Makefile.am b/include/Makefile.am
index 31eab07..136da21 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -34,7 +34,6 @@ EXTRA_DIST = \
 	OperationLabelPartition.h	\
 	Partition.h  			\
 	Proc_Partitions_Info.h	\
-	SWRaid.h				\
 	TreeView_Detail.h 		\
 	Utils.h 			\
 	Win_GParted.h 			\
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index c56f27a..7a4dd86 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -19,7 +19,6 @@
 #include "../include/Win_GParted.h"
 #include "../include/GParted_Core.h"
 #include "../include/DMRaid.h"
-#include "../include/SWRaid.h"
 #include "../include/FS_Info.h"
 #include "../include/LVM2_PV_Info.h"
 #include "../include/OperationCopy.h"
@@ -144,7 +143,6 @@ void GParted_Core::set_devices( std::vector<Device> & devices )
 	Proc_Partitions_Info pp_info( true ) ;  //Refresh cache of proc partition information
 	FS_Info fs_info( true ) ;  //Refresh cache of file system information
 	DMRaid dmraid( true ) ;    //Refresh cache of dmraid device information
-	SWRaid swraid( true ) ;    //Refresh cache of swraid device information
 	LVM2_PV_Info lvm2_pv_info( true ) ;	//Refresh cache of LVM2 PV information
 	
 	init_maps() ;
@@ -171,16 +169,6 @@ void GParted_Core::set_devices( std::vector<Device> & devices )
 				ped_device_get( temp_devices[ k ] .c_str() ) ;
 			}
 
-			//Try to find all swraid devices
-			if (swraid .is_swraid_supported() ) {
-				std::vector<Glib::ustring> swraid_devices ;
-				swraid .get_devices( swraid_devices ) ;
-				for ( unsigned int k=0; k < swraid_devices .size(); k++ ) {
-					set_thread_status_message( String::ucompose ( _("Scanning %1"), swraid_devices[k] ) ) ;
-					ped_device_get( swraid_devices[k] .c_str() ) ;
-				}
-			}
-
 			//Try to find all dmraid devices
 			if (dmraid .is_dmraid_supported() ) {
 				std::vector<Glib::ustring> dmraid_devices ;
diff --git a/src/Makefile.am b/src/Makefile.am
index 7c65fb2..d5ec826 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,7 +44,6 @@ gpartedbin_SOURCES = \
 	OperationLabelPartition.cc	\
 	Partition.cc			\
 	Proc_Partitions_Info.cc		\
-	SWRaid.cc				\
 	TreeView_Detail.cc		\
 	Utils.cc			\
 	Win_GParted.cc			\



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