diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-10-07 08:15:01 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-10-07 08:15:01 +0000 |
commit | 1dde52eb2bcedeced2ba3b13d0a07b3d591fc7c2 (patch) | |
tree | f653cba159a2e0f729d70ec026272882cd8ca123 /merge.cc | |
parent | Releasing debian version 1.24-2. (diff) | |
download | lziprecover-1dde52eb2bcedeced2ba3b13d0a07b3d591fc7c2.tar.xz lziprecover-1dde52eb2bcedeced2ba3b13d0a07b3d591fc7c2.zip |
Merging upstream version 1.25~pre1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'merge.cc')
-rw-r--r-- | merge.cc | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -65,7 +65,7 @@ bool file_crc( uint32_t & crc, const int infd, const char * const filename ) { const int rd = readblock( infd, buffer, buffer_size ); if( rd != buffer_size && errno ) - { show_file_error( filename, "Error reading input file", errno ); + { show_file_error( filename, read_error_msg, errno ); error = true; break; } if( rd > 0 ) crc32.update_buf( crc, buffer, rd ); @@ -153,12 +153,12 @@ bool diff_member( const long long mpos, const long long msize, const int size = std::min( (long long)buffer_size, msize - partial_pos ); const int rd = readblock( fd1, buffer1, size ); if( rd != size && errno ) - { show_file_error( filename1, "Error reading input file", errno ); + { show_file_error( filename1, read_error_msg, errno ); error = true; break; } if( rd > 0 ) { if( readblock( fd2, buffer2, rd ) != rd ) - { show_file_error( filename2, "Error reading input file", errno ); + { show_file_error( filename2, read_error_msg, errno ); error = true; break; } for( int i = 0; i < rd; ++i ) { @@ -267,8 +267,7 @@ int open_input_files( const std::vector< std::string > & filenames, } } if( tmp < min_member_size ) - { show_file_error( filenames[i].c_str(), "Input file is too short." ); - return 2; } + { show_file_error( filenames[i].c_str(), short_file_msg ); return 2; } if( i == 0 ) insize = tmp; else if( insize != tmp ) { show_2file_error( "Sizes of input files", filenames[0].c_str(), @@ -524,7 +523,7 @@ bool copy_file( const int infd, const int outfd, const long long max_size ) if( max_size >= 0 ) rest -= size; const int rd = readblock( infd, buffer, size ); if( rd != size && errno ) - { show_error( "Error reading input file", errno ); error = true; break; } + { show_error( read_error_msg, errno ); error = true; break; } if( rd > 0 ) { const int wr = writeblock( outfd, buffer, rd ); |