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