GNU Binutils with patches for OS216
Revision | 931004e4578333db0429abc7219282dbc0e10076 (tree) |
---|---|
Zeit | 1991-04-20 03:04:37 |
Autor | David Henkel-Wallace <gumby@cygn...> |
Commiter | David Henkel-Wallace |
allow the user to specify a file more than once on the command line --
the duplicate references are ignored.
::wq
@@ -511,7 +511,6 @@ extract_file(abfd) | ||
511 | 511 | exit(1); |
512 | 512 | } |
513 | 513 | } |
514 | - /* no need to byte-swap; the two formats are presumably compatible(!) */ | |
515 | 514 | fwrite(cbuf, 1, nread, ostream); |
516 | 515 | ncopied += tocopy; |
517 | 516 | } |
@@ -845,6 +844,14 @@ replace_members(files_to_move) | ||
845 | 844 | if (newer_only) { |
846 | 845 | struct stat fsbuf, |
847 | 846 | asbuf; |
847 | + | |
848 | + if (current->arelt_data == NULL) { | |
849 | + /* This can only happen if you specify a file on the | |
850 | + command line more than once. */ | |
851 | + fprintf (stderr, "Duplicate file specified: %s -- skipping.\n", *files_to_move); | |
852 | + goto next_file; | |
853 | + } | |
854 | + | |
848 | 855 | if (stat(*files_to_move, &fsbuf) != 0) { |
849 | 856 | if (errno != ENOENT) |
850 | 857 | bfd_fatal(*files_to_move); |