Remove unused 4th parameter from get_device_and_disk()

The flush parameter is no longer used and always defaults to false,
therefore remove it.  Instead flush is only set to true when calling
get_device() directly since commit:
    683dc9d1ab
    Only read partition table after not finding a whole disk file system (#771244)
This commit is contained in:
Mike Fleetwood 2024-08-22 08:10:20 +01:00
parent 8d9321917b
commit 37eaa2764f
2 changed files with 3 additions and 5 deletions

View File

@ -227,8 +227,7 @@ private:
#endif
static bool get_device( const Glib::ustring & device_path, PedDevice *& lp_device, bool flush = false );
static bool get_disk(PedDevice *lp_device, PedDisk*& lp_disk);
static bool get_device_and_disk(const Glib::ustring& device_path,
PedDevice*& lp_device, PedDisk*& lp_disk, bool flush = false);
static bool get_device_and_disk(const Glib::ustring& device_path, PedDevice*& lp_device, PedDisk*& lp_disk);
static void destroy_device_and_disk( PedDevice*& lp_device, PedDisk*& lp_disk );
static bool commit( PedDisk* lp_disk );
static bool commit_to_os( PedDisk* lp_disk, std::time_t timeout );

View File

@ -4141,10 +4141,9 @@ bool GParted_Core::get_disk(PedDevice *lp_device, PedDisk*& lp_disk)
}
bool GParted_Core::get_device_and_disk(const Glib::ustring& device_path,
PedDevice*& lp_device, PedDisk*& lp_disk, bool flush)
bool GParted_Core::get_device_and_disk(const Glib::ustring& device_path, PedDevice*& lp_device, PedDisk*& lp_disk)
{
if ( get_device( device_path, lp_device, flush ) )
if (get_device(device_path, lp_device))
{
if (get_disk(lp_device, lp_disk))
return true;