aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-12-11 15:21:40 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-12-11 15:21:40 +0200
commitf6a8a2cbd2d5ca40ea94900b55b845dd5ca87328 (patch)
treeda905dc2bd695d5bd079b96534e4a89d216b926d /src/util.c
parentfd262d116c4564c1796be9be2799619cf7785d07 (diff)
downloadcpio-f6a8a2cbd2d5ca40ea94900b55b845dd5ca87328.tar.gz
cpio-f6a8a2cbd2d5ca40ea94900b55b845dd5ca87328.tar.bz2
Fix symlink-bad-length test for 64-bit architectures.
* src/util.c: Return non-zero exit code if EOF is hit prematurely. * tests/symlink-bad-length.at: Revert to original archive: there's no use testing for recovery, because that depends on the host architecture. Don't test for exit code as well (same reason). Account for eventual warning messages.
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/util.c b/src/util.c
index 6c483f8..39c9813 100644
--- a/src/util.c
+++ b/src/util.c
@@ -209,10 +209,7 @@ tape_fill_input_buffer (int in_des, int num_bytes)
if (input_size < 0)
error (PAXEXIT_FAILURE, errno, _("read error"));
if (input_size == 0)
- {
- error (0, 0, _("premature end of file"));
- exit (PAXEXIT_FAILURE);
- }
+ error (PAXEXIT_FAILURE, 0, _("premature end of file"));
input_bytes += input_size;
}

Return to:

Send suggestions and report system problems to the System administrator.