1
0
Fork 0

Merging upstream version 1.3~pre2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 05:48:57 +01:00
parent 441fc24c68
commit c39cd90494
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
14 changed files with 62 additions and 27 deletions

View file

@ -152,13 +152,24 @@ int ztest_file( const int infd, int format_index,
const std::string & input_filename,
const std::vector< const char * > & ztest_args )
{
static int disable_xz = -1; // tri-state bool
const uint8_t * magic_data = 0;
int magic_size = 0;
if( format_index < 0 )
format_index = test_format( infd, &magic_data, &magic_size );
const char * const compressor_name = get_compressor_name( format_index );
if( !compressor_name )
return 0; // skip this file
return 0; // ignore this file
if( format_index == fmt_xz )
{
if( disable_xz < 0 )
{
std::string command( compressor_name ); command += " -V > /dev/null";
disable_xz = ( std::system( command.c_str() ) != 0 );
}
if( disable_xz ) return 0; // ignore this file if no xz installed
}
const pid_t pid = fork();
if( pid == 0 ) // child (compressor)