"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/LVM2_PV_Info.cc" between
gparted-1.2.0.tar.gz and gparted-1.3.0.tar.gz

About: GParted is a graphical partition editor for creating, reorganizing, and deleting disk partitions (using GNU libparted).

LVM2_PV_Info.cc  (gparted-1.2.0):LVM2_PV_Info.cc  (gparted-1.3.0)
skipping to change at line 359 skipping to change at line 359
{ {
for ( unsigned int i = 0 ; i < lvm2_vg_cache.size() ; i ++ ) for ( unsigned int i = 0 ; i < lvm2_vg_cache.size() ; i ++ )
{ {
if ( vgname == lvm2_vg_cache[i].vg_name ) if ( vgname == lvm2_vg_cache[i].vg_name )
return lvm2_vg_cache[i]; return lvm2_vg_cache[i];
} }
static LVM2_VG vg = {"", "", "", ""}; static LVM2_VG vg = {"", "", "", ""};
return vg; return vg;
} }
//Return string converted to a number, or -1 for error. // Return string converted to a number, or -1 for error.
//Used to convert PVs size or free bytes. // Used to convert PVs size or free bytes.
Byte_Value LVM2_PV_Info::lvm2_pv_size_to_num( const Glib::ustring str ) Byte_Value LVM2_PV_Info::lvm2_pv_size_to_num(const Glib::ustring& str)
{ {
Byte_Value num = -1 ; Byte_Value num = -1 ;
if ( str != "" ) if ( str != "" )
{ {
gchar * suffix ; gchar * suffix ;
num = (Byte_Value) g_ascii_strtoll( str .c_str(), & suffix, 10 ) ; num = (Byte_Value) g_ascii_strtoll( str .c_str(), & suffix, 10 ) ;
if ( num < 0 || ( num == 0 && suffix == str ) ) if ( num < 0 || ( num == 0 && suffix == str ) )
//Negative number or conversion failed //Negative number or conversion failed
num = -1 ; num = -1 ;
} }
 End of changes. 1 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)