Blame SOURCES/cpio-2.11-treat-read-errors.patch
|
|
f0f11f |
diff --git a/src/util.c b/src/util.c
|
|
|
f0f11f |
index ab49890..7332891 100644
|
|
|
f0f11f |
--- a/src/util.c
|
|
|
f0f11f |
+++ b/src/util.c
|
|
|
f0f11f |
@@ -203,7 +203,7 @@ tape_fill_input_buffer (int in_des, int num_bytes)
|
|
|
f0f11f |
get_next_reel (in_des);
|
|
|
f0f11f |
input_size = rmtread (in_des, input_buffer, num_bytes);
|
|
|
f0f11f |
}
|
|
|
f0f11f |
- if (input_size < 0)
|
|
|
f0f11f |
+ if (input_size == SAFE_READ_ERROR)
|
|
|
f0f11f |
error (1, errno, _("read error"));
|
|
|
f0f11f |
if (input_size == 0)
|
|
|
f0f11f |
{
|
|
|
f0f11f |
@@ -224,7 +224,7 @@ disk_fill_input_buffer (int in_des, off_t num_bytes)
|
|
|
f0f11f |
in_buff = input_buffer;
|
|
|
f0f11f |
num_bytes = (num_bytes < DISK_IO_BLOCK_SIZE) ? num_bytes : DISK_IO_BLOCK_SIZE;
|
|
|
f0f11f |
input_size = read (in_des, input_buffer, num_bytes);
|
|
|
f0f11f |
- if (input_size < 0)
|
|
|
f0f11f |
+ if (input_size == SAFE_READ_ERROR)
|
|
|
f0f11f |
{
|
|
|
f0f11f |
input_size = 0;
|
|
|
f0f11f |
return (-1);
|