diff options
Diffstat (limited to 'archival/cpio.c')
-rw-r--r-- | archival/cpio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/archival/cpio.c b/archival/cpio.c index dd9ed756c..2919ff8de 100644 --- a/archival/cpio.c +++ b/archival/cpio.c @@ -171,9 +171,7 @@ static int cpio_o(void) int fd = xopen(name, O_RDONLY); fflush(stdout); /* We must abort if file got shorter too! */ - if (bb_copyfd_size(fd, STDOUT_FILENO, st.st_size) != st.st_size) { - bb_error_msg_and_die("I/O error or file '%s' was truncated", name); - } + bb_copyfd_exact_size(fd, STDOUT_FILENO, st.st_size); bytes += st.st_size; close(fd); } |