[gparted] Drop use of long ago removed udevinfo



commit 3f15a66291af1f2db142edfe2a9219da219a29d5
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Mon Apr 1 19:11:53 2019 +0100

    Drop use of long ago removed udevinfo
    
    The last distribution to include the separate 'udevinfo' command was
    RHEL / CentOS 5 with udev 095.  All supported distributions have much
    newer versions of udev and instead have the 'udevadm' command.

 include/DMRaid.h | 1 -
 src/DMRaid.cc    | 7 +------
 2 files changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/include/DMRaid.h b/include/DMRaid.h
index 36a4b860..9d1a0945 100644
--- a/include/DMRaid.h
+++ b/include/DMRaid.h
@@ -65,7 +65,6 @@ private:
        static bool dmraid_cache_initialized ;
        static bool dmraid_found ;
        static bool dmsetup_found ;
-       static bool udevinfo_found ;
        static bool udevadm_found ;
        static std::vector<Glib::ustring> dmraid_devices ;
 };
diff --git a/src/DMRaid.cc b/src/DMRaid.cc
index 47e75a92..ef0a8967 100644
--- a/src/DMRaid.cc
+++ b/src/DMRaid.cc
@@ -32,7 +32,6 @@ namespace GParted
 bool DMRaid::dmraid_cache_initialized = false ;
 bool DMRaid::dmraid_found  = false ;
 bool DMRaid::dmsetup_found = false ;
-bool DMRaid::udevinfo_found = false ;
 bool DMRaid::udevadm_found  = false ;
 std::vector<Glib::ustring> DMRaid::dmraid_devices ;
 
@@ -87,7 +86,6 @@ void DMRaid::set_commands_found()
        //Set status of commands found 
        dmraid_found = (! Glib::find_program_in_path( "dmraid" ) .empty() ) ;
        dmsetup_found = (! Glib::find_program_in_path( "dmsetup" ) .empty() ) ;
-       udevinfo_found = (! Glib::find_program_in_path( "udevinfo" ) .empty() ) ;
        udevadm_found = (! Glib::find_program_in_path( "udevadm" ) .empty() ) ;
 }
 
@@ -249,10 +247,7 @@ Glib::ustring DMRaid::get_udev_dm_name( const Glib::ustring & dev_path )
        Glib::ustring error  = "" ;
        Glib::ustring dm_name = "" ;
 
-       if ( udevinfo_found )
-               Utils::execute_command( "udevinfo --query=all --name=" + Glib::shell_quote( dev_path ),
-                                       output, error, true );
-       else if ( udevadm_found )
+       if (udevadm_found)
                Utils::execute_command( "udevadm info --query=all --name=" + Glib::shell_quote( dev_path ),
                                        output, error, true );
 


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