Blame SOURCES/tar-1.30-disk-read-error.patch

18a904
From: Ondrej Dubaj <odubaj@redhat.com>
18a904
Date: Tue, 13 Apr 2021 11:47:32 +0200
18a904
Subject: [PATCH] do not report read disk error as file shrank
18a904
18a904
diff --git a/src/create.c b/src/create.c
18a904
index 181f7d9..7be10a9 100644
18a904
--- a/src/create.c
18a904
+++ b/src/create.c
18a904
@@ -1097,7 +1097,7 @@ dump_regular_file (int fd, struct tar_stat_info *st)
18a904
       size_left -= count;
18a904
       set_next_block_after (blk + (bufsize - 1) / BLOCKSIZE);
18a904
 
18a904
-      if (count != bufsize)
18a904
+      if (count == 0)
18a904
 	{
18a904
 	  char buf[UINTMAX_STRSIZE_BOUND];
18a904
 	  memset (blk->buffer + count, 0, bufsize - count);
18a904
diff --git a/tests/Makefile.am b/tests/Makefile.am
18a904
index 2d7939d..89fbf9a 100644
18a904
--- a/tests/Makefile.am
18a904
+++ b/tests/Makefile.am
18a904
@@ -230,7 +230,6 @@ TESTSUITE_AT = \
18a904
  spmvp10.at\
18a904
  time01.at\
18a904
  time02.at\
18a904
- truncate.at\
18a904
  update.at\
18a904
  update01.at\
18a904
  update02.at\
18a904
diff --git a/tests/Makefile.in b/tests/Makefile.in
18a904
index db14044..238b210 100644
18a904
--- a/tests/Makefile.in
18a904
+++ b/tests/Makefile.in
18a904
@@ -1457,7 +1457,6 @@ TESTSUITE_AT = \
18a904
  spmvp10.at\
18a904
  time01.at\
18a904
  time02.at\
18a904
- truncate.at\
18a904
  update.at\
18a904
  update01.at\
18a904
  update02.at\
18a904
diff --git a/tests/testsuite.at b/tests/testsuite.at
18a904
index 2a83757..52f73a6 100644
18a904
--- a/tests/testsuite.at
18a904
+++ b/tests/testsuite.at
18a904
@@ -424,7 +424,6 @@ m4_include([comprec.at])
18a904
 m4_include([shortfile.at])
18a904
 m4_include([shortupd.at])
18a904
 
18a904
-m4_include([truncate.at])
18a904
 m4_include([grow.at])
18a904
 m4_include([sigpipe.at])
18a904
 m4_include([comperr.at])