diff options
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 ); |