Remove backward compatibility for dmraid without -P option (#788007)
The -P option was first added to dmraid-1.0.0.rc15 released 2006-09-17 [1]. dmraid-1.0.0.rc16 (a later release) was included in Debian 6 and Ubunbu 12.04 LTS. dmraid-1.0.0.rc13 was included in RedHat/CentOS 5 however the -P option was back ported into RedHat/CentOS 5.1. All of these distributions are so old as to be no longer supported and yet they provided the dmraid -P option. Therefore backward compatibility for dmraid without the -P option is no longer required. So remove it. [1] old dmraid source code releases http://people.redhat.com/heinzm/sw/dmraid/src/old/ Bug 788007 - Remove minor bits of legacy from DMRaid module
This commit is contained in:
parent
458b420355
commit
a89d55a6f0
|
@ -330,16 +330,10 @@ bool DMRaid::create_dev_map_entries( const Partition & partition, OperationDetai
|
||||||
operationdetail .add_child( OperationDetail( tmp ) );
|
operationdetail .add_child( OperationDetail( tmp ) );
|
||||||
|
|
||||||
//Newer dmraid defaults to always inserting the letter 'p' between the device name
|
//Newer dmraid defaults to always inserting the letter 'p' between the device name
|
||||||
// and the partition number. Since the '-P' option is not valid for older dmraid
|
// and the partition number.
|
||||||
// versions, try with and without the '-P' option.
|
|
||||||
command = "dmraid -ay -P \"\" -v" ;
|
command = "dmraid -ay -P \"\" -v" ;
|
||||||
if ( execute_command( command, operationdetail .get_last_child() ) )
|
if ( execute_command( command, operationdetail .get_last_child() ) )
|
||||||
{
|
exit_status = false; // command failed
|
||||||
//Above command failed, so try without the '-P' option.
|
|
||||||
command = "dmraid -ay -v" ;
|
|
||||||
if ( execute_command( command, operationdetail .get_last_child() ) )
|
|
||||||
exit_status = false ; //command failed
|
|
||||||
}
|
|
||||||
|
|
||||||
operationdetail .get_last_child() .set_status( exit_status ? STATUS_SUCCES : STATUS_ERROR ) ;
|
operationdetail .get_last_child() .set_status( exit_status ? STATUS_SUCCES : STATUS_ERROR ) ;
|
||||||
|
|
||||||
|
@ -354,16 +348,10 @@ bool DMRaid::create_dev_map_entries( const Glib::ustring & dev_path )
|
||||||
bool exit_status = true ;
|
bool exit_status = true ;
|
||||||
|
|
||||||
//Newer dmraid defaults to always inserting the letter 'p' between the device name
|
//Newer dmraid defaults to always inserting the letter 'p' between the device name
|
||||||
// and the partition number. Since the '-P' option is not valid for older dmraid
|
// and the partition number.
|
||||||
// versions, try with and without the '-P' option.
|
|
||||||
command = "dmraid -ay -P \"\" -v" ;
|
command = "dmraid -ay -P \"\" -v" ;
|
||||||
if ( Utils::execute_command( command, output, error, true ) )
|
if ( Utils::execute_command( command, output, error, true ) )
|
||||||
{
|
exit_status = false; // command failed
|
||||||
//Above command failed, so try without the '-P' option.
|
|
||||||
command = "dmraid -ay -v" ;
|
|
||||||
if ( Utils::execute_command( command, output, error, true ) )
|
|
||||||
exit_status = false; //command failed
|
|
||||||
}
|
|
||||||
|
|
||||||
return exit_status ;
|
return exit_status ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue