[gparted] Ensure dmraid devices created for devices passed on command line



commit 0810792f0223e2963248811b5fe86b6a4f108e3e
Author: Curtis Gedak <gedakc gmail com>
Date:   Wed Sep 30 16:32:32 2009 -0600

    Ensure dmraid devices created for devices passed on command line

 src/GParted_Core.cc |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 5799f8b..b0a8079 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -246,6 +246,20 @@ void GParted_Core::set_devices( std::vector<Device> & devices )
 
 		std::sort( device_paths .begin(), device_paths .end() ) ;
 	}
+	else
+	{
+		//Device paths were passed in on the command line.
+
+		//Ensure that dmraid device entries are created
+		for ( unsigned int t = 0 ; t < device_paths .size() ; t++ ) 
+		{
+			if ( dmraid .is_dmraid_supported() &&
+			     dmraid .is_dmraid_device( device_paths[t] ) )
+			{
+				dmraid .create_dev_map_entries( dmraid .get_dmraid_name( device_paths [t] ) ) ;
+			}
+		}
+	}
 
 	for ( unsigned int t = 0 ; t < device_paths .size() ; t++ ) 
 	{



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