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.
This commit is contained in:
Mike Fleetwood 2019-04-01 19:11:53 +01:00 committed by Curtis Gedak
parent 5a52b44071
commit 3f15a66291
2 changed files with 1 additions and 7 deletions

View File

@ -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 ;
};

View File

@ -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 );