Create new method get_partition_path

This method will be used as an entry point to the libparted
function ped_partition_get_path
This commit is contained in:
Curtis Gedak 2010-08-15 14:14:04 -06:00
parent 53c49349f7
commit 9bd8b14871
2 changed files with 13 additions and 0 deletions

View File

@ -66,6 +66,7 @@ private:
const Glib::ustring & filename,
std::map< Glib::ustring, std::vector<Glib::ustring> > & map ) ;
std::vector<Glib::ustring> get_alternate_paths( const Glib::ustring & path ) ;
Glib::ustring get_partition_path( PedPartition * lp_partition ) ;
void set_device_partitions( Device & device ) ;
GParted::FILESYSTEM get_filesystem() ;
void read_label( Partition & partition ) ;

View File

@ -857,6 +857,18 @@ std::vector<Glib::ustring> GParted_Core::get_alternate_paths( const Glib::ustrin
return paths ;
}
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 ) ;
return partition_path ;
}
void GParted_Core::set_device_partitions( Device & device )
{
int EXT_INDEX = -1 ;