Merging upstream version 1.5.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
3a44ca3665
commit
060bb99151
30 changed files with 328 additions and 279 deletions
18
ztest.cc
18
ztest.cc
|
@ -1,5 +1,5 @@
|
|||
/* Ztest - verify integrity of compressed files
|
||||
Copyright (C) 2010-2015 Antonio Diaz Diaz.
|
||||
Copyright (C) 2010-2016 Antonio Diaz Diaz.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -51,9 +51,10 @@ namespace {
|
|||
void show_help()
|
||||
{
|
||||
std::printf( "Ztest verifies the integrity of the specified compressed files.\n"
|
||||
"Uncompressed files are ignored. If no files are specified, the integrity\n"
|
||||
"of compressed data read from standard input is verified. Data read from\n"
|
||||
"standard input must be all in the same compression format.\n"
|
||||
"Uncompressed files are ignored. If no files are specified, or if a file\n"
|
||||
"is specified as '-', the integrity of compressed data read from standard\n"
|
||||
"input is verified. Data read from standard input must be all in the same\n"
|
||||
"compression format.\n"
|
||||
"\nThe supported formats are bzip2, gzip, lzip and xz.\n"
|
||||
"\nNote that some xz files lack integrity information, and therefore can't\n"
|
||||
"be verified as reliably as the other formats can.\n"
|
||||
|
@ -270,13 +271,18 @@ int main( const int argc, const char * const argv[] )
|
|||
for( ; argind < parser.arguments(); ++argind )
|
||||
filenames.push_back( parser.argument( argind ) );
|
||||
|
||||
if( filenames.empty() ) filenames.push_back("-");
|
||||
if( filenames.empty() ) filenames.push_back( "-" );
|
||||
|
||||
int retval = 0;
|
||||
bool error = false;
|
||||
bool stdin_used = false;
|
||||
while( next_filename( filenames, input_filename, error, recursive ) )
|
||||
{
|
||||
if( input_filename.empty() ) infd = STDIN_FILENO;
|
||||
if( input_filename.empty() )
|
||||
{
|
||||
if( stdin_used ) continue; else stdin_used = true;
|
||||
infd = STDIN_FILENO;
|
||||
}
|
||||
else
|
||||
{
|
||||
infd = open_instream( input_filename );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue