mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/10321 * bucomm.c (get_file_size): Return -1 on error. * objcopy.c (copy_file): Report empty file.
This commit is contained in:
@@ -2159,9 +2159,13 @@ copy_file (const char *input_filename, const char *output_filename,
|
||||
bfd *ibfd;
|
||||
char **obj_matching;
|
||||
char **core_matching;
|
||||
off_t size = get_file_size (input_filename);
|
||||
|
||||
if (get_file_size (input_filename) < 1)
|
||||
if (size < 1)
|
||||
{
|
||||
if (size == 0)
|
||||
non_fatal (_("error: the input file '%s' is empty"),
|
||||
input_filename);
|
||||
status = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user