From 0f29376e9918e1905d86f5cfda294b8e939ce07d Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Thu, 29 Dec 2005 00:10:05 +0000 Subject: [PATCH] because lp_partition didn't get initialized the libpartedscan for free * src/GParted_Core.cc: because lp_partition didn't get initialized the libpartedscan for free space would always fail. fixed. --- ChangeLog | 5 +++++ src/GParted_Core.cc | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index add87326..0bcf7bd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-12-29 Bart Hakvoort + + * src/GParted_Core.cc: because lp_partition didn't get initialized the + libpartedscan for free space would always fail. fixed. + 2005-12-28 Bart Hakvoort * replaced popen() with Glib::spawn_command_line_sync() + general diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 6a3c125e..0cb93d14 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -667,9 +667,11 @@ void GParted_Core::LP_Set_Used_Sectors( Partition & partition ) { PedFileSystem *fs = NULL; PedConstraint *constraint = NULL; - + if ( lp_disk ) { + lp_partition = ped_disk_get_partition_by_sector( lp_disk, (partition .sector_end + partition .sector_start) / 2 ) ; + if ( lp_partition ) { fs = ped_file_system_open( & lp_partition ->geom );