[gparted] Drop use of long ago removed udevsettle



commit a4c00e03e67c9d77591d244e8c2ee9b97ba11ceb
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sat Jul 6 16:18:11 2019 +0100

    Drop use of long ago removed udevsettle
    
    Separate udevsettle command was merged into udevadm back in udev 117
    (released 2007-11-13) by:
        https://github.com/systemd/systemd/commit/225cb03bd851adc6d269b13bdf2b1bfded2b96b9
        udevadm: merge all udev tools into a single binary
    
    The oldest supported distributions have these much newer versions of
    udev:
      Distro             EOL        udevadm -V
      Debian 8           2020-Apr   215 (combined systemd and udev)
      RHEL / CentOS 7    2024-Jun   219 (combined systemd and udev)
      Ubuntu 16.04 LTS   2021-Apr   229 (combined systemd and udev)

 src/GParted_Core.cc | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index e02ac279..2501fa51 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -76,7 +76,6 @@ const std::time_t SETTLE_DEVICE_PROBE_MAX_WAIT_SECONDS = 1;
 const std::time_t SETTLE_DEVICE_APPLY_MAX_WAIT_SECONDS = 10;
 
 static bool udevadm_found = false;
-static bool udevsettle_found = false;
 static bool hdparm_found = false;
 
 static const Glib::ustring GPARTED_BUG( _("GParted Bug") );
@@ -130,7 +129,6 @@ Glib::ustring GParted_Core::get_version_and_config_string()
 void GParted_Core::find_supported_core()
 {
        udevadm_found = ! Glib::find_program_in_path( "udevadm" ).empty();
-       udevsettle_found = ! Glib::find_program_in_path( "udevsettle" ).empty();
        hdparm_found = ! Glib::find_program_in_path( "hdparm" ).empty();
 }
 
@@ -4218,9 +4216,7 @@ bool GParted_Core::commit_to_os( PedDisk* lp_disk, std::time_t timeout )
 
 void GParted_Core::settle_device( std::time_t timeout )
 {
-       if ( udevsettle_found )
-               Utils::execute_command( "udevsettle --timeout=" + Utils::num_to_str( timeout ) ) ;
-       else if ( udevadm_found )
+       if (udevadm_found)
                Utils::execute_command( "udevadm settle --timeout=" + Utils::num_to_str( timeout ) ) ;
        else
                sleep( timeout ) ;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]