[gparted] Ensure partition path name is compatible with dmraid (#622217)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Ensure partition path name is compatible with dmraid (#622217)
- Date: Tue, 17 Aug 2010 16:38:15 +0000 (UTC)
commit 81986c0990eef65593ef23397074cf61cdca415f
Author: Curtis Gedak <gedakc gmail com>
Date: Tue Aug 17 09:56:13 2010 -0600
Ensure partition path name is compatible with dmraid (#622217)
This patch along with a few preceding patches address the
following bug reports:
Closes bug #622217 - gparted live 0.6.0-1 incompatibility with
AMD RAID (SB750 southbridge)
Closes Ubuntu launchpad bug 600729 - Gparted not usable on
fakeraid arrays
https://bugs.launchpad.net/ubuntu/+source/gparted/+bug/600729
src/GParted_Core.cc | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index d36f2a3..ab268bf 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -859,12 +859,20 @@ std::vector<Glib::ustring> GParted_Core::get_alternate_paths( const Glib::ustrin
Glib::ustring GParted_Core::get_partition_path( PedPartition * lp_partition )
{
- char * lp_path ; //we have to free the result of ped_partition_get_path()
- Glib::ustring partition_path ;
-
- lp_path = ped_partition_get_path( lp_partition ) ;
- partition_path = lp_path ;
- free( lp_path ) ;
+ DMRaid dmraid; //Use cache of dmraid device information
+ char * lp_path; //we have to free the result of ped_partition_get_path()
+ Glib::ustring partition_path;
+
+ lp_path = ped_partition_get_path(lp_partition);
+ partition_path = lp_path;
+ free(lp_path);
+
+ //Ensure partition path name is compatible with dmraid
+ if (dmraid .is_dmraid_supported() && dmraid .is_dmraid_device(
+ partition_path))
+ {
+ partition_path = dmraid .make_path_dmraid_compatible(partition_path);
+ }
return partition_path ;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]