Pass unmodified parameter to useable_device() as const (!46)

GParted_Core::useable_device() doesn't change the pointed to PedDevice
structure.  Pass it as const so the compiler enforces this.

Closes !46 - Whole device FAT32 file system reports device busy warning
             from mlabel
This commit is contained in:
Mike Fleetwood 2019-07-10 11:00:32 +01:00 committed by Curtis Gedak
parent e5898e5813
commit 7289d4c52a
2 changed files with 3 additions and 2 deletions

View File

@ -229,7 +229,7 @@ private:
static bool commit( PedDisk* lp_disk );
static bool commit_to_os( PedDisk* lp_disk, std::time_t timeout );
static void settle_device( std::time_t timeout );
static bool useable_device( PedDevice * lp_device );
static bool useable_device(const PedDevice* lp_device);
static PedPartition* get_lp_partition( const PedDisk* lp_disk, const Partition & partition );
static PedExceptionOption ped_exception_handler( PedException * e ) ;

View File

@ -4041,7 +4041,8 @@ void GParted_Core::capture_libparted_messages( OperationDetail & operationdetail
}
}
bool GParted_Core::useable_device( PedDevice * lp_device )
bool GParted_Core::useable_device(const PedDevice* lp_device)
{
g_assert( lp_device != NULL ); // Bug: Not initialised by call to ped_device_get() or ped_device_get_next()